3 ms·
> You should script defensively, for when this is run on Windows or elsewhere [maybe Android] that will break this assumption. I think you are missing the poin
by marginalia_nu 5y ago
> You should script defensively, for when this is run on Windows or elsewhere [maybe Android] that will break this assumption.
I think you are missing the point. I wouldn't run a shellscript on Windows or any other place than the terminal I entered it into. It's an expression of something I want to do at that particular time in that particular directory.
The entire point of my post is that if I wished to write something portable and robust, I wouldn't use bash in the first place. That's not what bash is good at. But quick one-offs, holy crap is it good at that.
- chasil 5y agoI've run many Borne/POSIX shell scripts on Windows for things that I've needed to do. The most straightforward POSIX shell on Windows is the Busybox port, which uses the Almquist shell (ash) with many bashisms reintroduced. https://frippery.org/busybox/ https://frippery.org/busybox/