The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 10-23-2006
napolayan napolayan is offline
Registered User
 

Join Date: Oct 2006
Location: Bangalore, India
Posts: 41
ls -l|while read line
do
awk '$5 != 0 {print $0}'
done>file1


$5 is the fifth field in output of ls - l which gives the no. of characters in the file. so i hv written all the files which dont hv zero characters (or bytes) to file1
Reply With Quote