3 ms·
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 nee
by ams6110 12y ago
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.
- pm90 12y agoUsing 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!
- eropple 12y agoI 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.
- emmelaich 12y agoI 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]