When embedded execution output is a list of values used in a for loop, the shell divides this output by spaces and by carriage returns.
Sometimes, youll want to divide the output by carriage return only. By changing the value of the environment variable
can change this behavior of the for loop. The for loop uses the value of IFS to divide the command output that it uses as values. IFS defaults
to spaces, tabs, and carriage returns. Change this value to carriage returns only by setting IFS to the value control-M. This represents a
Let's look at a Insert Carriage Return
illustrating this. Here's an
example where each line is used as one value: