display full line instead of single word in for loop
I am brand new to linux, and trying to do a few things with scripts. My question is in using a for loop, how I can get it to display a full line instead of a single word. For example:
for file in `ls -l`:do echo $file done If anyone knows how to get the $file variable to display a full line instead of a single word I would greatly appreciate it. |
Set the field seperator to a newline before the loop:
IFS=" " for file in `ls -l`;do echo $file done |
Thanks!!!
Thanks a bunch.
I am too embarrassed to tell you how much time I wasted trying to get that result. Thanks again! |
Re: Thanks!!!
Quote:
|
All times are GMT -5. The time now is 02:27 PM. |