[Top][All Lists]

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

awk - manip mult lines by treating ^ and $ as normal characters?

From: sgharvey
Subject: awk - manip mult lines by treating ^ and $ as normal characters?
Date: Wed, 9 May 2007 15:51:03 -0700 (PDT)

I need to turn this:

Flibber Tee Gibbet$
VerySpecial Number:$
Short Description:$
ABC - Some Stuff - More stuff$
Thing That I Don't Care About:$
Totally don't care$
Yes I Care: 1.234$
More Goodness:$
Person, Place or Thing$
More Nonsense: Bla$

into this:

Flibber Tee Gibbet\t1/2/2003$
VerySpecial Number:\t12345$
Short Description:\tABC - Some Stuff - More stuff please.$
Yes I Care:\t1.234$
More Goodness:\tPerson, Place or Thing$

I've played around with RS and FS settings, trying to get AWK to treat ^ and
$ as normal characters, to be poked and nudged around like any other, and
I'd really like to be able to search for this regex:
^Flibber Tee Gibbet:$.*^VerySpecial Number:$
but AWK won't find it no matter what I set RS and FS to. Am I using the
wrong tool? Is there some useful information that exists out there that my
searching has not yet found? Or (more likely) am I just not getting it?
View this message in context: 
Sent from the Gnu - Grep mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]