If we had a list file which listing like:
which we write a bash script and want to print out each line with cat command. The script listing as:
for line in `cat list_file`
But the result is:
This issue is due to the Internal Field Separator (IFS) in bash is default defined as <space><tab><newline>. So the solution is simple. Just add the following command in bash script (line 2 of the above example) to overwrite it.
And the output result is correctly.