The UNIX and Linux Forums  

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




Thread: script error
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 09-01-2007
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,380
Quote:
Originally Posted by MANISH KU View Post
Hi gurus,
I have a script in which i m using following line of code
no_record=echo `wc -l filename` | cut -f1 -d" "

Code:
no_record=$( wc -l < filename )