3 ms·
Perhaps it's just me, but flow control statements and functions in Bash have yet to scare me off. It's still faster, and readable, to write even moderately comp
by falcolas 11y ago
Perhaps it's just me, but flow control statements and functions in Bash have yet to scare me off. It's still faster, and readable, to write even moderately complex scripts in bash.
This is doubly true if you have to chain together external scripts - the "easy" ways to do it in Python can have some very major limitations.
I liken Bash scripting to Perl scripting. You can write safe, beautiful, and readable code in both. However, you can also create a summoning circle to the 5th circle of hell if you don't spend the effort to make it safe, beautiful and readable.
- alpsgolden 11y agoPart of this was that I became an expert in python before learning much bash, so it was just much easier to write in the language I already knew, and I found the bash syntax strange with a bunch of gotchas. I'm sure though, that if I did a ton of bash scripting I would not even notice the gotchas. You are correct that the main weakness of ipython is that it doesn't have pipes, and that chaining is very limited. But usually this does not impact me. And if all your scripting is in python, then you just import functions and run them, rather than chaining scripts together.