From 194a062c2d07eb43a14182d9fb2e4c20c7051f72 Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Mon, 9 Aug 2010 08:06:09 +0200 Subject: [PATCH] BUG: tr: extra operand `d' error caused by missing quoting Reported by Bill Goffe on the todotxt mailing list. --- todo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/todo.sh b/todo.sh index 315987a..eba4b47 100755 --- a/todo.sh +++ b/todo.sh @@ -550,7 +550,7 @@ _addto() { if [ $TODOTXT_VERBOSE -gt 0 ]; then TASKNUM=$(sed -n '$ =' "$file") BASE=$(basename "$file") - PREFIX=$(echo ${BASE%%.[^.]*} | tr [a-z] [A-Z]) + PREFIX=$(echo ${BASE%%.[^.]*} | tr 'a-z' 'A-Z') echo "$TASKNUM $input" echo "${PREFIX}: $TASKNUM added." fi @@ -658,7 +658,7 @@ _list() { if [ $TODOTXT_VERBOSE -gt 0 ]; then BASE=$(basename "$FILE") - PREFIX=$(echo ${BASE%%.[^.]*} | tr [a-z] [A-Z]) + PREFIX=$(echo ${BASE%%.[^.]*} | tr 'a-z' 'A-Z') NUMTASKS=$( echo -ne "$filtered_items" | sed -n '$ =' ) TOTALTASKS=$( echo -ne "$items" | sed -n '$ =' )