News for hackers. Stuff that matters.
Re:Why you should learn at least a little bit of Awk by gchpaco on Wednesday September 29, 2010 @05:57PM (#1741294)
Awk isn't so bad if you're clever about RS, but sed sucks. A tragic gap in the Plan 9 legacy has been structural regular expressions, which deal with these situations adroitly.
Re:Why you should learn at least a little bit of Awk by silentbicycle on Wednesday September 29, 2010 @06:36PM (#1741425)
(RS = record separator, it just defaults to newline. You can handle multi-line patterns in awk.)
Re:Why you should learn at least a little bit of Awk by blasdel on Thursday September 30, 2010 @01:21AM (#1742369)
My problem was that the records really were purely newline-delimited, but I needed to process them using information from their context in the stream.
Re:Why you should learn at least a little bit of Awk by silentbicycle on Thursday September 30, 2010 @02:28AM (#1742476)
Fair enough. That's beyond the common cases awk addresses. At that point, I just switch to Lua. (I forget if you're a Python or Ruby guy.)