Linked by pkrumins on Thu 19th Feb 2009 12:17 UTC
Thread beginning with comment 349811
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: awk '{ gsub(/^[ \t]+|[ \t]+$/, ""); print }'
by AtariFan on Thu 19th Feb 2009 23:11
in reply to "RE[2]: awk '{ gsub(/^[ \t]+|[ \t]+$/, ""); print }'"
RE[4]: awk '{ gsub(/^[ \t]+|[ \t]+$/, ""); print }'
by pkrumins on Thu 19th Feb 2009 23:39
in reply to "RE[3]: awk '{ gsub(/^[ \t]+|[ \t]+$/, ""); print }'"




Member since:
2007-12-04
I've never considered awk hard to use. You can learn the basics in about thirty pages. Have you ever sat down and read "Effective GAWK Programming"?
http://www.gnu.org/software/gawk/manual/gawk.html
sed is not hard either. Python is great too, but for little quick jobs awk is great. awk can be just as maintainable if you write it cleanly (and I've seen python code that is a mess, because you can write messy Python too.) But for a one liner, who cares if it is maintainable? You use it once then throw it out!