Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] print grep results to file



On Mon, Jan 05, 2004 at 01:31:28PM +0900, Charles Muller wrote:
> I want to search a directory of files, retrieve the lines that contain
> "<hdwd>" and print them to a file. I tried to do it with this:
> 
> dell@[chuck] # grep "<hdwd>" *.xml -print > /home/chuck/headwords.txt
> 
> ...but I am missing something. I googled around a bit to try to find
> some sort of example for this, but so far, no luck. Any suggestions?

What happens if you leave out print?  (Tested on FreeBSD, and sometimes
builtin commands are slightly different.)

For instance grep "<hdwd>" *.html > /home/chuck/headwords.txt




-- 

Scott Robbins

PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 D575 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

Buffy: We have a marching jazz band? 
Oz: Yeah, but, you know, since the best jazz is improvisational, 
we'd be going off in all directions, banging into floats... scary. 
Willow: He's just being Oz. 
Oz: Pretty much full time. 

Attachment: pgp00019.pgp
Description: PGP signature


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links