3 ms·
If your argument for using the shell (as opposed to a real programming language such as Python) is portability, writing a shell script that is not POSIX complia
by njkleiner 6y ago
If your argument for using the shell (as opposed to a real programming language such as Python) is portability, writing a shell script that is not POSIX compliant literally defeats the point.
Also, 100 lines of UX-related bloat hardly classifies as "minimal".
- deleted 6y ago[deleted]
- gtsop 6y ago> writing a shell script that is not POSIX compliant literally defeats the point. Your argument is invalid. Even if the script isn't posix compliant you are comparingb portability with regards to the availability of bash vs python binaries on your target machine. Do you have data to support python is more likely to exist in linux machines than bash?
- jedimastert 6y agoI think the argument made here is that choosing bash over python because of portability doesn't square with using non-POSIX-compliant bash commands.
- deleted 6y ago[deleted]
- njkleiner 6y ago> Do you have data to support python is more likely to exist in linux machines than bash? That's not what I'm saying. I never claimed Python was more widely supported that Bash, in terms of this argument you should use neither, that's the whole point. What I'm saying is that it does not make sense to use Bash over e.g. Python in favor of supporting a wider range of machines while at the same time limiting support to Bash environments when you could use POSIX instead which is a subset of Bash and therefore more widely supported than Bash and Python. Do you have data to prove that POSIX shell less likely to be supported than Bash and Python respectively? Otherwise I don't see how my argument is invalid. Of course Bash support is larger than Python support (that's what you seem to be saying), and therefore even a Bash-specific script is more portable. What I'm suggesting is that it's contradictory to stop there when you could simply drop the bashisms and go for full POSIX compliance for even more portability. That said, if I'm misunderstanding you, please point out how so.
- gtsop 6y agoNo thats a fair argument. I didn't quite get it initially. I still find the template usefull for my personal usecases but I also get your point
- SAI_Peregrinus 6y agoThere's also the fact that while Bash is common on Linux, it's not generally the default shell for the BSDs or other UNIXes. But most of them will have Python installed. Also it's easier to use Python on Windows than a POSIX shell, though neither is present by default.
- GoblinSlayer 6y agoI noticed python is somehow sucked as an accidental dependency of unrelated packages. How do I find the culprit?