diff --git a/SC2013.md b/SC2013.md index a2e585e..73c850f 100644 --- a/SC2013.md +++ b/SC2013.md @@ -39,6 +39,15 @@ done < mypipe rm mypipe ``` +NOTE: `grep -v '^ *#'` is a placeholder example and not needed. To just loop through a file: +```sh +while IFS= read -r line +do + echo "Line: $line" +done << file +# or: done <<< "$variable" +``` + ### Rationale: For loops by default (subject to `$IFS`) read word by word. Additionally, glob expansion will occur.