News for hackers. Stuff that matters.
Re:An Awk Primer by ams6110 on Sunday June 29, 2014 @11:35PM (#7963575)
sed, grep, and awk are such useful utilities. A lot of developers I work with tend to reach for Python first, but in most cases these tools are all that you need.
Re:An Awk Primer by pm90 on Monday June 30, 2014 @12:37AM (#7963721)
Using Python is probably a better choice though. Its so easy to call other programs, emulate a bash script and much much more....all in code which is easily readable and maintainable!
Re:An Awk Primer by eropple on Monday June 30, 2014 @09:27AM (#7964908)
I like Python well enough, but at Localytics we use Ruby where I'd previously used Python and I'm finding it a lot nicer. Backticks alone make my life way, way easier.
Re:An Awk Primer by emmelaich on Tuesday July 01, 2014 @06:35AM (#7969941)
I agree that Python is a bit of an impedance mis-match for lots of short scripts compared to Ruby and Perl, however it's not that bad.

I'm forcing myself to use Python for SysAdmin tasks because I like it so much.

Here's backticks in Python, pretty much a copy n paste from the docs.

    def backtick(cmd):
        return subprocess.Popen(shlex.split(cmd),
            stdout=subprocess.PIPE).communicate()[0]
Re:An Awk Primer by eropple on Tuesday July 01, 2014 @11:15AM (#7971172)
> I'm forcing myself to use Python for SysAdmin tasks because I like it so much.

This seems unwise.

Use the best tool for a given job.

Re:An Awk Primer by emmelaich on Sunday July 06, 2014 @07:02AM (#7994236)
Well I exaggerate a little.

And folks tend make too much of the differences between languages.