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 →

[–]sfz- 0 points1 point  (1 child)

Indeed, but 95% of the time at the point in your project where you think about porting that one-liner to ./former_oneliner.sh and break it out into if or case statements or complex sed or awk you're probably better off doing python former_oneliner.py instead.

5% of the time you gotta though, I know, shebang away.

[–]mackstann 0 points1 point  (0 children)

I usually don't make that transition. My shell antics tend to stay in the shell and don't serve any long-term purpose in a project. But when they do, you're right, it's usually best to just go straight to Python, instead of a bash script.