Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Note that the only command that is potentially affected by $IFS in there is echo $SHELL as you forgot to quote the variable expansion. Other than that, the value of $IFS is not relevant here. Commented Nov 27, 2017 at 19:44
  • The shell sends the arguments to sed via the pipeline. I believe that $IFS still applies here. Commented Nov 30, 2017 at 13:29
  • No, the shell passes arguments to echo and echo writes the concatenation of them with space and a newline character to the pipe. $IFS is involved in the read builtin command and unquoted parameter and arithmetic expansions and command substitutions and the expansion of "$*" and "${array[*]}" and that's about it. Commented Nov 30, 2017 at 13:36
  • Interesting. I'm having trouble wrapping my head around what you're saying but it fully makes sense. Thanks. Commented Nov 30, 2017 at 18:19