4 ms·
I find bash to be more convenient in a few scenarios that basically fall into two major categories, which come into play whenever the script is simple enough th
by Goladus 15y ago
I find bash to be more convenient in a few scenarios that basically fall into two major categories, which come into play whenever the script is simple enough that complex data structures (dicts, nested lists, etc) aren't very helpful.
The first is when there are key external tools that work better than the python libraries and invoking them with subprocess or os.system is more cumbersome than just using bash.
The second is when the implicit command-oriented nature of bash or syntax shortcuts makes for a much more succinct program. eg. 'do_thing && do_other_thing || fail'
I'll admit though, my threshold for switching to python is not particularly high.