Hi ALL:),
I have a file for e.g.
ajdflkj|dkj|djfj|go|123|4||||||||||||||89|101|||||||||||||||
The length of file is not fixed. So wat the limits should be given in for loop to access till end of file????
Thanks in advance.....
Hi ALL:),
I have a file for e.g.
ajdflkj|dkj|djfj|go|123|4||||||||||||||89|101|||||||||||||||
The length of file is not fixed. So wat the limits should be given in for loop to access till end of file????
Thanks in advance.....
hi,
You need not to know the limit of the line in for loop in unix,
the syntax is simple
for line in $filename
do
echo $line
done
Thanks
namish
Thanks namish for quick reply, but i m having a single line file in which
ajdflkj|dkj|djfj|go|123|4||||||||||||||89|101|||||||||||||||
i want to store the fields(which are separated by pipe |) in an array n i dont know the end of file. So how long the loop should run??