The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: ls command
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 05-29-2007
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
ls-command-here is your ls command. Replace "ls-command-here" and put your ls command there

"print $NF" tells awk to print the field that is referenced by the total number of fields. i.e. if your ls output has 9 fields, NF will be 9, and hence $NF will print field 9 - the last field.

Cheers
ZB