on Thu, May 29, 2003 at 10:52:50PM -0400, Kevin McKinley ([EMAIL PROTECTED]) wrote: > On Thu, 29 May 2003 22:00:28 -0400 > David Z Maze <[EMAIL PROTECTED]> wrote: > > > 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.) > > Won't this print all lines, and delete the word "Message" where it appears?
1. No. 2. Try it and see. Peace. -- Karsten M. Self <[EMAIL PROTECTED]> http://kmself.home.netcom.com/ What Part of "Gestalt" don't you understand? Geek for hire: http://kmself.home.netcom.com/resume.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

