All pastes #73146 Raw Edit

Someone

public text v1 · immutable
#73146 ·published 2006-06-27 14:33 UTC
rendered paste body
I am wondering why I get the following different output from two different
bash operations.
 
Lets say I have a file called t1.txt, and it contains the following line:
 
This is line1
This is line2
This is line3
 
If I give the bash command cat t1.txt, I get the following
 
This is line1
This is line2
This is line3
 
However, if I do:
 
for f in `cat t1.txt` ; do echo $f ; done
 
I get the following
 
This 
is 
line1
This 
is 
line2
This 
is 
line3
 
etc.
 
Any hints on combining the cat command with the for command, and have the
output look like:
 
This is line1
This is line2
This is line3
 
Thanks in advance for any assistance