3 ms·
It’s shell specific though, just like using FOO=bar cmd prefixing to make environment changes. Better to use env(1) and keep everything rooted in Unix processe
by gorgoiler 2y ago
It’s shell specific though, just like using FOO=bar cmd prefixing to make environment changes. Better to use env(1) and keep everything rooted in Unix processes rather than shell syntax, imho.
# bashisms
<file tr z-o m-g | …
FOO=bar python3 …
# processes
cat file | tr z-o m-g | …
env FOO=bar python3 …
- shiomiru 2y agoFile redirection is specified in POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07 https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V... So is FOO=bar cmd. (I guess it is shell-specific if you include csh in the game, but then what isn't...)
- MathMonkeyMan 2y agoBoth of the features that you mention are specified in POSIX, which means that bash, ksh, zsh, sh, ash, dash, etc. implement them. I find myself googling "OpenGroup shell command language" pretty often to check this sort of thing.