[NTLUG:Discuss] Scripting help
    Dennis Myhand 
    dmyhand at ednaisd.org
       
    Tue Apr 28 10:38:13 CDT 2009
    
    
  
Fred James wrote:
> Dennis Myhand
> Is anywhere near that what you want (see below)?
> Regards
> Fred James
> 
> $ cat fred
> The quick brown fox jumped over the lazy dog
> $ grep the fred | wc
>       1       9      45
> $ grep -i the fred | wc
>       1       9      45
> $
> 
Yeah, Fred, that works.  What I finnaly did, just so they could see the 
redirect to another file as well was
grep the fred | wc > thecount.txt
That gets the numbers from wc out from under the line and redirects to 
another file.  I want to give them a hypothetical example of grepping a 
pattern and saving the number of instances of the pattern to a file that 
can be reviewed later.  These are mostly M$ children but even the one 
who runs Linux at home has never used a comamnd line before.
    
    
More information about the Discuss
mailing list