Re: for command

From: Zebrouvis, Lois (zebrouvis@PPG.COM)
Date: Thu Nov 06 2003 - 09:16:26 EST


cat testfile | while read line
do
echo $line
done

-----Original Message-----
From: John Dunn [mailto:john.dunn@SEFAS.CO.UK]
Sent: Thursday, November 06, 2003 9:11 AM
To: aix-l@Princeton.EDU
Subject: for command

Given the following data how do I get the following script to echo each
line, rather than each string?

for line in `cat testfile`
do
 echo $line
done

testfile =

hhhh jjjjjjj kkkkkkkkk
ggggg lllllll mmmmmm
sssss kkkkk llllll



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:20 EDT