> for anything more involved than a one-liner alias kind of script, I turn to python
I agree with this. If you can trust your users to have python3 in their environment, I don't see a good reason to use sh/bash instead of python. Non-trivial shell scripts are unreadable to me, and the semantics are too different from normal programming languages.
The only scenario I can see is a script that has to call multiple commands over and over, which can be a pain in python if you're piping a lot of stuff and all that. No, piping grep to cut and sed doesn't count; you can do that in python itself.
> If you can trust your users to have python3 in their environment, I don't see a good reason to use sh/bash instead of python
You would need to ensure said users have all the pip dependencies your python script imports as well. shell scripts don’t have that issue unless you’re calling some external program that isn’t installed.
>shell scripts don’t have that issue unless you’re calling some external program that isn’t installed.
Good thing that bash has such an extensive amount of standard libraries and that you're almost never calling external programs? And unlike Python, which is seemingly almost exclusively calling third-party libraries from PyPI?
That said, personally, for anything more involved than a one-liner alias kind of script, I turn to python, or PowerShell on Windows.