3 ms·
> The current POSIX standard defines source code-level compatibility for only two programming languages: The C language (C99) and the command language (shell).
by chasil 3y ago
> The current POSIX standard defines source code-level compatibility for only two programming languages: The C language (C99) and the command language (shell).
AWK is also defined in the standard.
Yes, subtleties are lost here.
- chasil 3y agosed is also a Turing-complete language.
- vorakl 3y agoInteresting! I just wonder... How would you do a conditional branching in sed?
- chasil 3y agoThere is a conditional branch instruction in sed that is taken if the last substitute command was successful. The O'Reilly book on sed & awk is available online for free from various sources (I grabbed a rar archive of it from somewhere). https://freecomputerbooks.com/The-Unix-CD-Bookshelf-Version-2-1.html https://freecomputerbooks.com/The-Unix-CD-Bookshelf-Version-...
- vorakl 3y agoIt's a good point! I've addressed it. I referred here to the following definition: "2.4 Other Language-Related Specifications POSIX.1-2017 is currently specified in terms of the shell command language and ISO C. Bindings to other programming languages are being developed." But, you are definitely right that some of the tools, defined as standard "utilities", such as AWK, also have their own language. Although, it is only defined in the "utilities" section, https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/a... However, "sh" is also defined under "utilities", although it has an extensive language specification that is provided as a separate document.
- chasil 3y agoThe motivation for the standard, in the fear of a Sun-AT&T alliance, is also an elephant in the room.