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
> 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
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
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]:
--- 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=
[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
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
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