Here we are continues the magic. You can find all parts here ….
TwelveMethods to Parse a File Line by Line — Part 1
TwelveMethods to Parse a File Line by Line — Part 2
TwelveMethods to Parse a File Line by Line — Part 3
TwelveMethods to Parse a File Line by Line — Part 4
TwelveMethods to Parse a File Line by Line — Part 1
TwelveMethods to Parse a File Line by Line — Part 2
TwelveMethods to Parse a File Line by Line — Part 3
TwelveMethods to Parse a File Line by Line — Part 4
Method 10:
exec 3<&0
exec 0< $FILENAME
while line LINE
do
echo "$LINE"
:
done
exec 0<&3
exec 3<&0
exec 0< $FILENAME
while line LINE
do
echo "$LINE"
:
done
exec 0<&3
Method 11:
exec 3<&0
exec 0< $FILENAME
while LINE=$(line)
do
print "$LINE"
:
done
exec 0<&3
exec 3<&0
exec 0< $FILENAME
while LINE=$(line)
do
print "$LINE"
:
done
exec 0<&3
Method 12:
exec 3<&0
exec 0< $FILENAME
while line LINE
do
echo "$LINE"
:
done
exec 0<&3
exec 3<&0
exec 0< $FILENAME
while line LINE
do
echo "$LINE"
:
done
exec 0<&3
njoy the simplicity.......
Atul Singh