This list does not mention the most surprising (and a bit disturbing) bash feature for me: it can open tcp/udp sockets on its own [0] through a feature called “special redirects” (there’s no actual filesystem involved here):
Note how I did not speak of POSIX; you mistake the ksh example as general assumption.
My reply to pl’s comment tells you what I meant with “portable” (admittedly, wording was a bit misleading).
This list does not mention the most surprising (and a bit disturbing) bash feature for me: it can open tcp/udp sockets on its own [0] through a feature called “special redirects” (there’s no actual filesystem involved here):
[0] https://dmytrish.net/blog/en/bash-tcp
I scanned over this, and OSH [1] should support basically everything here. If it doesn’t, feel free to file a bug!
https://github.com/oilshell/oil/issues
Hm now that I look more at the repo, it looks like this would be a good test: https://github.com/dylanaraps/pure-bash-bible/blob/master/test.sh
[1] http://www.oilshell.org/blog/2018/07/23.html
Lots of things can already be done with portable sh code. typeset for example is quite powerful but mentioned nowhere in the repo:
In fact, this builtin is often wrapped by the shell itself, at least in OpenBSD’s ksh:
typesetis not posixtypeset -fdoestypeset -fudoes in your kshtypeset -idoesn’t really have the same effect in bash and kshtrorawklocal, but it’s not posix either“portable sh code” != “it works on my openbsd”
Note how I did not speak of POSIX; you mistake the ksh example as general assumption. My reply to pl’s comment tells you what I meant with “portable” (admittedly, wording was a bit misleading).
what’s your definition of portable?
What do you mean with portable sh code? I just tried it with
dashand it has no typeset built in.At least available in Bourne and Korn shell derivatives; (Debian’s) Almquist Shell does not implement that particular builtin.