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 -->
  #4 (permalink)  
Old 09-15-2007
cfajohnson's Avatar
cfajohnson cfajohnson is offline
Shell programmer, author
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 974
Quote:
Originally Posted by Nidhi2177 View Post
What can we use instead of 'awk' to do the same?? cut???

The obvious (and most sensible) command to use is awk.

You can use cut, but first you would have to pipe it through tr to remove multiple spaces:

Code:
ls -l | tr -s ' ' | cut -d ' ' -f 5
Reply With Quote