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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 09-17-2007
Nidhi2177 Nidhi2177 is offline
Registered User
 

Join Date: Sep 2007
Posts: 9
Thanks All,

I have got the solution..


lines=`ls -l | tr -s [:space:] | cut -d ' ' -f 5 | wc -l`
lines=`expr $lines - 1`

echo "Fifth column of 'ls -l' command:::"
ls -l | tr -s [:space:] |cut -d ' ' -f 5 | tail -n $lines
Reply With Quote