Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HowTo read last line in a file

Status
Not open for further replies.

rvarman

IS-IT--Management
Apr 24, 2003
91
FR
Hi,

In a loop (ksh), i can't able to read my last line.
While read line
do
echo
done < file

Can anyone give me your ideas
Thanks
 
for line in `tail -1 file`
do
echo $line
done

seems to do the trick. HTH.
 
Merci beaucoup,

Really it works fine.
Thank you very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top