6 Matching Annotations
- Sep 2023
-
mywiki.wooledge.org mywiki.wooledge.org
-
unix.stackexchange.com unix.stackexchange.com
-
Using quotes for i in "$(cat $1)"; results in i being assigned the whole file at once. What should I change?
-
-
stackoverflow.com stackoverflow.com
-
Bash doesn't do word expansion on quoted strings in this context. For example: $ for i in "a b c d"; do echo $i; done a b c d $ for i in a b c d; do echo $i; done a b c d
-
- Jun 2021
-
mywiki.wooledge.org mywiki.wooledge.org
-
Bash (like all Bourne shells) has a special syntax for referring to the list of positional parameters one at a time, and $* isn't it. Neither is $@. Both of those expand to the list of words in your script's parameters, not to each parameter as a separate word.
-
-
superuser.com superuser.com
-
Instead of using a for loop, which will fail on spaces unless you redefine the IFS variable, I would recommend using a while loop combined with find.
-