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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 12-15-2004
videsh77 videsh77 is offline
Registered User
  
 

Join Date: Aug 2004
Posts: 144
Wink Interested in partial command output.

Command output is given to the console. As in the following case -

wc -l filename
produces following output
nn filename

From this, I am only interested with nn(rowcount). Cant we simply extract it thr console?

I also tried with null device, I know as - /dev/null

wc -l filename > /dev/null | cut -d " " -f 1 /dev/null

This also didnt help me.

Will I have to use temporary file, in order to retrieve only rowcount?