22 ms·
Nothing precludes you from using bash scripts even if ysit fish interactively. Just set a shebang in the script, or run it with bash script.sh. That said, pers
by auxym 5y ago
Nothing precludes you from using bash scripts even if ysit fish interactively. Just set a shebang in the script, or run it with bash script.sh.
That said, personally, for anything more involved than a one-liner alias kind of script, I turn to python, or PowerShell on Windows.
- Fnoord 5y ago> That said, personally, for anything more involved than a one-liner alias kind of script, I turn to python, or PowerShell on Windows You and submitter (who according to CV is proficient in Python) might like Oilshell.
- maleldil 5y ago> 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.
- computershit 5y ago> 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.
- Hamuko 5y ago>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?