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

Re: awk usage question



Kevin Coyner <kevin@rustybear.com> writes:

>     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.

awk '/Message/ { print substr($0, index($0, "Message")+length("Message")) }'

-- 
Alan Shutko <ats@acm.org> - I am the rocks.
Looking for a developer in St. Louis? http://web.springies.com/~ats/
Gorns do it cold-bloodedly.



Reply to: