fixed paste usage to be mac os compatible
authorChris Koeritz <cak0l@virginia.edu>
Thu, 20 Feb 2020 18:58:12 +0000 (13:58 -0500)
committerChris Koeritz <cak0l@virginia.edu>
Thu, 20 Feb 2020 18:58:12 +0000 (13:58 -0500)
scripts/agenda/info_overload_report.sh

index 46a5dc2553f2a5f824680fe812c1ff2d95f63351..b4ad7388d9d83bb9bcc178c0cb4d9c557a3b0046 100644 (file)
@@ -1,3 +1,4 @@
+#!/bin/bash
 
 # these metrics are how bogged down we are in to-do type items.
 
@@ -22,7 +23,7 @@ function calculate_count()
 function calculate_weight()
 {
   local dir="$1"; shift
-  local weight=$(find "$dir" -type f -exec echo \"{}\" ';' 2>/dev/null | grep -v "\.svn" | grep -v "\.git"| grep -v "\.basket" | grep -v "\.version" | grep -v "\.keep" | xargs ls -al | awk '{ print $5 }' | paste -sd+ | bc 2>/dev/null)
+  local weight=$(find "$dir" -type f -exec echo \"{}\" ';' 2>/dev/null | grep -v "\.svn" | grep -v "\.git"| grep -v "\.basket" | grep -v "\.version" | grep -v "\.keep" | xargs ls -al | awk '{ print $5 }' | paste -sd+ | bc 2>/dev/null)
   if [ -z "$weight" ]; then echo 0; else echo "$weight"; fi
 }