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 -->
  #6 (permalink)  
Old 08-31-2007
ranj@chn ranj@chn is offline Forum Advisor  
Playing with Ubuntu Now!
  
 

Join Date: Oct 2005
Location: Chennai
Posts: 365
tail should work

Quote:
fazliturk
I thing tail is not suitable for pipe why pipe sends line by line so for tail -1 every line will be the last line
tail should work. Check this,

Code:
rkumar@bdc4reteaix1w: /home/rkumar >ls
bkgdtest         dead.letter      mbox             mypipe           nohup.out        test.pl          unix_forum
cprog            f1.txt           myfile           newone           restart_sshd.sh  testpipe.sh      whsmith
rkumar@bdc4reteaix1w: /home/rkumar >ls | tail -1
whsmith