BUG: tr: extra operand `d' error caused by missing quoting

Reported by Bill Goffe on the todotxt mailing list.
This commit is contained in:
Ingo Karkat
2010-08-09 08:06:09 +02:00
parent 94325f57cd
commit 194a062c2d

View File

@@ -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 '$ =' )