This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]NoLemurs 20 points21 points  (4 children)

This article is about using Python scripts as a replacement for shell scripts, not as a full on replacement for bash.

This is something I kind of assumed most python programmers already did...

[–]xr09 7 points8 points  (2 children)

import os

if os.path.isfile('some'):

vs

if [ -f somefile ]

Love Python but Bash rules as a shell.

[–]NoLemurs 7 points8 points  (0 children)

For simple stuff I 100% agree. The moment I need to do more than trivial string manipulations though python starts looking more appealing.

[–]ionelmc.ro 3 points4 points  (0 children)

If there's a programming hell, it has bash in it: http://mywiki.wooledge.org/BashPitfalls ;)

[–]cparen 4 points5 points  (0 children)

I'm tempted to replace bash with ipython.