The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 04-21-2009
devtakh devtakh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore
Posts: 514
try using a while loop instead...your issue seems to be because of the echo command

while read line
do
echo $line
done < "filename"

if you want the line number also:

i=1;while read line; do echo "$i $line";i=`expr $i + 1`; done < "filename"


cheers,
Devaraj Takhellambam