From ab32e9ac4819fa8b6bb06a564bfb6d3f1ddd4888 Mon Sep 17 00:00:00 2001 From: koalaman Date: Fri, 19 Jan 2018 18:25:00 -0800 Subject: [PATCH] Updated SC2031 (markdown) --- SC2031.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SC2031.md b/SC2031.md index 37af0f3..a70380d 100644 --- a/SC2031.md +++ b/SC2031.md @@ -74,3 +74,9 @@ This applies not only to setting variables, but also setting shell options and c ### Exceptions You can ignore this error if you don't care that the changes aren't reflected, because work on the value branches and shouldn't be recombined. + +### Related resources: + +* [BashFaq: I set variables in a loop that's in a pipeline. Why do they disappear after the loop terminates?](https://mywiki.wooledge.org/BashFAQ/024) +* [Bash Pitfalls: grep foo bar | while read -r; do ((count++)); done](https://mywiki.wooledge.org/BashPitfalls#pf8) +* [StackOverflow: A variable modified inside a while loop is not remembered](https://stackoverflow.com/questions/16854280/a-variable-modified-inside-a-while-loop-is-not-remembered)