Kevin Coyner <[EMAIL PROTECTED]> writes:

> I'm trying to filter a file from tcpdump (actually tethereal) using awk,
> but am stuck in one spot.
>
> In words, what I'd like to do is:
>
>     1.  only read lines with the word "Message" in it
>     2.  in lines with "Message", output everything to the right of the
>         word "Message".  This could be one word or twenty words.

I'd do this with sed, not awk:

  sed -ne 's/.*Message//p'

(By default, don't print lines [-n]; use an expression [-e] that
replaces an arbitrary number of characters followed by the word
"Message" with nothing, and print the result.)

-- 
David Maze         [EMAIL PROTECTED]      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
        -- Abra Mitchell


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to