Re: [techtalk] help with sorting text in a file

2000-05-14 Thread Sean McAfee
Gene Dolgner <[EMAIL PROTECTED]> wrote: >alissa bader wrote: >> actually I needed to grab a particular string. For >> example, all patterns matching QAA: [snip] >> anyway the easiest way to do this (and the way I did >> it before but forgot :>) was to use a "cut" on this >> file. (and someone

Re: [techtalk] help with sorting text in a file

2000-05-14 Thread Ian Phillips
> string "QAA." Tried doing a grep, but I got the > entire line again, not just the portion of it that > contained "QAA." Argh. The frustrating thing is I Is this what you want: bash-2.02$ for i in `cat file_name_to_search`;do > echo $i | grep QAA > done Yours, Ian. -- #ifndef __COMMON_SE

Re: [techtalk] help with sorting text in a file

2000-05-13 Thread Chris J/#6
Gene wrote: > > Try this ... > > cat file | grep 'QAA' | sed s/^.*QAA/QAA/ | sed s/:.*$// > > That's paraphrased, and I know there is a shorter way of doing it, > but that should get the job done. Basically, it gets all the lines > with QAA in them, then removes the text either side of the > QAA

Re: [techtalk] help with sorting text in a file

2000-05-12 Thread Gene Dolgner
alissa bader wrote: > > --- srl <[EMAIL PROTECTED]> wrote: > > > what part of the line do you need to grab, other > > than QAA? > > got some sample data? > > actually I needed to grab a particular string. For > example, all patterns matching QAA: > > May 11 23:59:57 smtp-out sendmail[7569]:

Re: [techtalk] help with sorting text in a file

2000-05-12 Thread alissa bader
--- srl <[EMAIL PROTECTED]> wrote: > what part of the line do you need to grab, other > than QAA? > got some sample data? actually I needed to grab a particular string. For example, all patterns matching QAA: May 11 23:59:57 smtp-out sendmail[7569]: QAA14179: to=<[EMAIL PROTECTED]>, delay=

Re: [techtalk] help with sorting text in a file

2000-05-12 Thread Jeff Dike
[EMAIL PROTECTED] said: > On Fri, 12 May 2000, alissa bader wrote: > > Specifically, anything containing the > > string "QAA." Tried doing a grep, but I got the > > entire line again, not just the portion of it that > > contained "QAA." > what part of the line do you need to grab, other than QAA

Re: [techtalk] help with sorting text in a file

2000-05-12 Thread srl
On Fri, 12 May 2000, alissa bader wrote: > I need to grab a list of stuff with a matching pattern > in a log file. Specifically, anything containing the > string "QAA." Tried doing a grep, but I got the > entire line again, not just the portion of it that > contained "QAA." Argh. The frustrat

[techtalk] help with sorting text in a file

2000-05-12 Thread alissa bader
or, duh. I need to grab a list of stuff with a matching pattern in a log file. Specifically, anything containing the string "QAA." Tried doing a grep, but I got the entire line again, not just the portion of it that contained "QAA." Argh. The frustrating thing is I know I did something like t