News for hackers. Stuff that matters.
Re:A few facts about POSIX by chasil on Tuesday April 30, 2024 @09:08AM (#40210610)
> 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.

Re:A few facts about POSIX by chasil on Tuesday April 30, 2024 @01:12PM (#40213403)
sed is also a Turing-complete language.
Re:A few facts about POSIX by vorakl on Tuesday April 30, 2024 @05:05PM (#40216328)
Interesting! I just wonder... How would you do a conditional branching in sed?
Re:A few facts about POSIX by chasil on Saturday May 04, 2024 @10:03PM (#40261750)
There 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-...

Re:A few facts about POSIX by vorakl on Tuesday April 30, 2024 @05:03PM (#40216314)
It'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/a... However, "sh" is also defined under "utilities", although it has an extensive language specification that is provided as a separate document.

Re:A few facts about POSIX by chasil on Saturday May 04, 2024 @10:05PM (#40261757)
The motivation for the standard, in the fear of a Sun-AT&T alliance, is also an elephant in the room.