Don't quote things in "for i in $foo" - it will break loops
authorSteve McIntyre <steve@einval.com>
Sun, 4 Mar 2018 21:56:29 +0000 (21:56 +0000)
committerSteve McIntyre <steve@einval.com>
Sun, 4 Mar 2018 21:56:29 +0000 (21:56 +0000)
abcde

diff --git a/abcde b/abcde
index 6723c2b..384954a 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -144,7 +144,7 @@ get_last()
                        last=$stdin
                done
        else
-               for last in "$@" ; do :; done
+               for last in $@ ; do :; done
        fi
        echo "$last"
 }
@@ -2064,7 +2064,7 @@ do_discid ()
                                                        TRACKS=${#OFFSETTIMES[@]}
                                                        unset OFFSETS
                                                        #echo "processing offsetimes ${OFFSETTIMES[@]}"
-                                                       for OFFSETTIME in "${OFFSETTIMES[@]}"; do
+                                                       for OFFSETTIME in ${OFFSETTIMES[@]}; do
                                                                OFFSETS="$OFFSETS $(( 10#${OFFSETTIME:0:2} * 4500 + 10#${OFFSETTIME:3:2} * 75 + 10#${OFFSETTIME:6:2} ))"
                                                                #OFFSETS[${#OFFSETS[*]}]=$(( 10#${OFFSETTIME:0:2} * 4500 + 10#${OFFSETTIME:3:2} * 75 + 10#${OFFSETTIME:6:2} ))
                                                        done