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 -->
  #5 (permalink)  
Old 05-10-2008
matrixmadhan matrixmadhan is offline
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,547
Quote:
Originally Posted by kartikkumar84@g View Post
wc -l filename

does not work because it returns the file name as well, so it cant be used in an expression.
there is a way

Code:
cnt=`wc -l < filename`
Reply With Quote