BUG: tr: extra operand `d' error caused by missing quoting
Reported by Bill Goffe on the todotxt mailing list.
This commit is contained in:
4
todo.sh
4
todo.sh
@@ -550,7 +550,7 @@ _addto() {
|
|||||||
if [ $TODOTXT_VERBOSE -gt 0 ]; then
|
if [ $TODOTXT_VERBOSE -gt 0 ]; then
|
||||||
TASKNUM=$(sed -n '$ =' "$file")
|
TASKNUM=$(sed -n '$ =' "$file")
|
||||||
BASE=$(basename "$file")
|
BASE=$(basename "$file")
|
||||||
PREFIX=$(echo ${BASE%%.[^.]*} | tr [a-z] [A-Z])
|
PREFIX=$(echo ${BASE%%.[^.]*} | tr 'a-z' 'A-Z')
|
||||||
echo "$TASKNUM $input"
|
echo "$TASKNUM $input"
|
||||||
echo "${PREFIX}: $TASKNUM added."
|
echo "${PREFIX}: $TASKNUM added."
|
||||||
fi
|
fi
|
||||||
@@ -658,7 +658,7 @@ _list() {
|
|||||||
|
|
||||||
if [ $TODOTXT_VERBOSE -gt 0 ]; then
|
if [ $TODOTXT_VERBOSE -gt 0 ]; then
|
||||||
BASE=$(basename "$FILE")
|
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 '$ =' )
|
NUMTASKS=$( echo -ne "$filtered_items" | sed -n '$ =' )
|
||||||
TOTALTASKS=$( echo -ne "$items" | sed -n '$ =' )
|
TOTALTASKS=$( echo -ne "$items" | sed -n '$ =' )
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user