top | item 25429626

(no title)

njkleiner | 5 years 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".

discuss

order

gtsop|5 years 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?

njkleiner|5 years 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.

jedimastert|5 years ago

I think the argument made here is that choosing bash over python because of portability doesn't square with using non-POSIX-compliant bash commands.

GoblinSlayer|5 years ago

I noticed python is somehow sucked as an accidental dependency of unrelated packages. How do I find the culprit?