From f66a2a0bfbc6a2513228c36ad3e588002cd40009 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 19 May 2019 14:50:14 -0700 Subject: [PATCH] Updated SC2013 (markdown) --- SC2013.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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.