3 ms·
Neither echo -e nor nc are POSIX. I don't think there is a strictly POSIX one-liner.
by ainar-g 7y ago
Neither echo -e nor nc are POSIX.
I don't think there is a strictly POSIX one-liner.
- arendtio 7y ago`echo -e` should be easily replaceable with `printf` but nc remains to be a problem.
- tyingq 7y agoIs inetd "Posix"? It has command line switches to not fork, and to specify the config file. Maybe it takes a config file of "-" to mean stdin.
- deleted 7y ago[deleted]
- arendtio 7y agoI doubt it. At least I can't find it anywere here: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c...
- ksherlock 7y agoprintf(1) is POSIX and is a superset of echo.
- arminiusreturns 7y agoYou are right, but it was the closest I could find.