View Single Post
Old 29-Nov-2007, 02:57 AM   #2 (permalink)
Anilrgowda
Administrator
 
Anilrgowda's Avatar

Posts: 18,715
Join Date: Jan 2006
Rep Power: 10 Anilrgowda is on a distinguished road

IM:
Default Re: grep and write to file from Shell script

as wc does not have a option to skip the filename in the output you need to use cat :-(

$( wc -l $2.$$ ) should become $( cat $2.$$ | wc -l ) an no filename should be printed.


------------------


Anilrgowda is offline   Reply With Quote