From 448cecb91db28a9e59bc952ae2b78342147e5da3 Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Fri, 13 Mar 2009 11:00:34 -0400 Subject: [PATCH] Simplify and Reused Code to Print ls Summary Line --- todo.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/todo.sh b/todo.sh index cf5219a..13ec09c 100755 --- a/todo.sh +++ b/todo.sh @@ -581,13 +581,8 @@ case $action in echo -e "$command" if [ $TODOTXT_VERBOSE == 1 ]; then + NUMTASKS=$( echo -e "$command" | wc -l | sed 's/ .*//' ) echo "--" - NUMTASKS=$( - sed '/^$/d' "$src" \ - | eval ${filter_command:-cat} \ - | wc -l \ - | sed 's/^[[:space:]]*\([0-9]*\).*/\1/' \ - ) echo "TODO: $NUMTASKS of $LINES tasks shown from $src" fi