diff --git a/SC2013.md b/SC2013.md index 14e5930..54b4221 100644 --- a/SC2013.md +++ b/SC2013.md @@ -69,6 +69,5 @@ Line: bar ### Exceptions -If you want to read word by word, you should still use a while read loop (e.g. with `read -a` to read words into an array). +If you do want to read word by word, you can set `$IFS` appropriately and disable globbing with `set -f`, and then [[ignore]] this warning. Alternatively, you can pipe through `tr ' ' '\n'` to turn words into lines, and then use `while read`. In Bash/Ksh, you can also use a `while read -a` loop to get an array of words per line. -Rare reasons for ignoring this message is if you don't care because your file only contains numbers and you're not interested in good practices, or if you've set `$IFS` appropriately and also disabled globbing.