From 4359290b3c9471402969a44bedba052697317fc2 Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Sat, 7 Jan 2012 23:17:38 +0100 Subject: [PATCH] Avoid external TR when replacing , with space. No need for an external tool, Bash can do a global literal substitution itself. --- todo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/todo.sh b/todo.sh index ee5a3f1..50e8fd3 100755 --- a/todo.sh +++ b/todo.sh @@ -991,7 +991,7 @@ case $action in # Split multiple depri's, if comma separated change to whitespace separated # Loop the 'depri' function for each item - for item in $(echo $* | tr ',' ' '); do + for item in ${*//,/ }; do getTodo "$item" if [[ "$todo" = \(?\)\ * ]]; then @@ -1015,7 +1015,7 @@ case $action in # Split multiple do's, if comma separated change to whitespace separated # Loop the 'do' function for each item - for item in $(echo $* | tr ',' ' '); do + for item in ${*//,/ }; do getTodo "$item" # Check if this item has already been done