Post AWJUnsPyWvjBwwGsGe by penguin42@mastodon.org.uk
(DIR) More posts by penguin42@mastodon.org.uk
(DIR) Post #AWJUnrUtx84f5vZIJ6 by cks@mastodon.social
2023-06-03T11:05:02Z
0 likes, 0 repeats
I'm going to have to write a "Unix is not POSIX" techblog article, aren't I. And it's all because of GNU Grep (3.8+).
(DIR) Post #AWJUnsPyWvjBwwGsGe by penguin42@mastodon.org.uk
2023-06-03T11:54:39Z
0 likes, 0 repeats
@cks You mean the egrep/fgrep isms?
(DIR) Post #AWJYF0Ac7Cy3fqiBt2 by oclsc@mstdn.ca
2023-06-03T12:33:05Z
0 likes, 0 repeats
@penguin42 @cks In socialist GNUstan, egrep and fgrep dare not speak their names.
(DIR) Post #AWKAukM36VHl2lOQtM by cks@mastodon.social
2023-06-03T19:46:27Z
1 likes, 0 repeats
@penguin42 Yep. Which GNU Grep justifies with 'they're not POSIX' and people are accepting as a real argument.
(DIR) Post #AWKBx2BDtt2MrSz4Pg by penguin42@mastodon.org.uk
2023-06-03T19:58:07Z
0 likes, 0 repeats
@cks The strange thing I find about that is just how much of GNU is extra stuff; my early exposure to GNU stuff was use of gtar/gmake on Sun and other UNIX's because of the extra features everyone used.
(DIR) Post #AWKEOr4czFnkQrIDU8 by cks@mastodon.social
2023-06-03T20:25:32Z
0 likes, 0 repeats
@penguin42 It really is quite odd. Everywhere else GNU tools have extended and ignored POSIX (eg, du ignores POSIX's 512-byte blocks), but here GNU Grep is wrapping itself in POSIX for a decidedly un-liked action.
(DIR) Post #AWKvIZukAVN7VLvHqy by cks@mastodon.social
2023-06-04T01:40:19Z
0 likes, 0 repeats
For reasons, I'm now wondering what top non-POSIX commands people would find in their shell histories if they looked, and how many of them people would consider core Unix commands as opposed to third party things like Git stuff.(Curious people with shell history files can look at https://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html for the POSIX command list, more or less.)
(DIR) Post #AWKvIbPyZrwuAVXkAq by lanodan@queer.hacktivis.me
2023-06-04T04:25:49.495238Z
0 likes, 0 repeats
@cks I ended up documenting some of those in https://hacktivis.me/git/cross-unix-documentation.mdoc/man1x/ because POSIX just lags behind too much.realpath(1) and seq(1) being missing would be a pain, install(1) maybe we could do without (I don't use it myself).
(DIR) Post #AWMVsw82qMyeKojzFo by leah@blahaj.social
2023-06-04T11:59:02Z
1 likes, 0 repeats
@cks Commands many would consider core that are not in POSIX: dmesg, host, killall, ping, size, tarCommands I know are not POSIX but will insist on: strace, ssh, scp, curl(Based on 386k archival shell history.)
(DIR) Post #AWMWcRd6ZR0l43y7ou by nobrowser@mathstodon.xyz
2023-06-04T13:10:13Z
0 likes, 0 repeats
@lanodan isn't seq a very limited special case of athena-jot ?
(DIR) Post #AWMWcSWlEVWxqg0ZZQ by lanodan@queer.hacktivis.me
2023-06-04T22:58:43.600288Z
0 likes, 0 repeats
@nobrowser More or less but seq(1) is present everywhere, including all the BSDs.Meanwhile the availability/maintenance of jot on Linux is a mess as it's not part of BusyBox or coreutils but instead it's in random forge-less tarballs (be it athena-jot or a freshmeat-era version Gentoo uses).
(DIR) Post #AWMXE5wzcbk2pdDxrM by nobrowser@mathstodon.xyz
2023-06-04T13:17:12Z
0 likes, 0 repeats
@leah most or all of these are kind of expected though because POSIX doesn't cover networking or processes. I'm pretty sure even `ps` isn't in.
(DIR) Post #AWMXE6bPCM4Gqy8Eqm by leah@blahaj.social
2023-06-04T13:43:50Z
1 likes, 0 repeats
@nobrowser also ofc POSIX covers sockets, but it only specifies uucp as command...
(DIR) Post #AWf8kaJlmWrkOkfZFw by mhoye@mastodon.social
2023-06-03T11:59:05Z
0 likes, 0 repeats
@cks So this posix, they embraced it but then extended it, you're saying.
(DIR) Post #AWf8kaytJdl8SHuPLs by cks@mastodon.social
2023-06-03T19:45:16Z
0 likes, 0 repeats
@mhoye This POSIX, it embraced without the extending. Maybe it's more like half embracing. (One third embracing if you count by commands...)
(DIR) Post #AWf8kbfQlTmqaDoNeq by fanf@mendeddrum.org
2023-06-03T20:41:37Z
0 likes, 0 repeats
@cks @mhoye grep -E and grep -F are extensions, they weren’t in version 7 :-)
(DIR) Post #AWf8kcRHtY4GyeCbFg by fanf@mendeddrum.org
2023-06-03T20:48:33Z
0 likes, 0 repeats
@cks @mhoye based on a quick look through https://man.freebsd.org/cgi/man.cgi it seems the -E and -F options were added in system V (eg they are not in the sunos 4 manual but are in solaris 2.5.1) so they would not have been portable until the late 1990s i guess
(DIR) Post #AWf8kd3vZsyauUHSTo by alanc@fosstodon.org
2023-06-06T00:03:44Z
1 likes, 0 repeats
@fanf @cks @mhoye grep -E & -F didn't come from System V, which is why they still aren't supported in /usr/bin/grep in Solaris. Sun added /usr/xpg4/bin/grep with -E & -F support in Solaris 2.5 to comply with version 4 of the X/Open standard, as described in the Rationale of the latest version: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html
(DIR) Post #AWf8kdgvEuAUrQWbGC by fanf@mendeddrum.org
2023-06-06T08:26:34Z
0 likes, 0 repeats
@alanc @cks @mhoye oh, so they are even newer than i thought! thanks for the correction
(DIR) Post #AWf8keKGsbdypSw1aq by alanc@fosstodon.org
2023-06-13T22:29:29Z
1 likes, 0 repeats
@fanf @cks @mhoye I was in the office today, so pulled out the POSIX 1003.2-1992 book, and it defines grep -E and -F and declares egrep/fgrep to be obsolete equivalents to those, so I suppose Solaris hadn't gotten that part of POSIX implemented until they did the X/Open work. (That was before my time at Sun.)
(DIR) Post #AWf8wKXQHCLsvuekbo by JdeBP@tty0.social
2023-06-06T16:15:41Z
0 likes, 0 repeats
@leah @cks That's my login shell too, generally. And I just found a quirk in it if one upgrades from 5.2 to 5.3. I was going to post a Q&A to StackExchange. But there's a strike, now.Have you tried the Watanabe shell? That has a help command, too.#zsh #yash
(DIR) Post #AWf8wLVgf8YdwoqsXg by JdeBP@tty0.social
2023-06-06T16:53:29Z
0 likes, 0 repeats
@leah @cks In other popular non-SUS commands news there are jot, ifconfig, dnsqr, stat, fetch, less, and clear.Do you think that the fgrep purists ought to not clear their screens, too? (-:Or use any other name for their compiler than c99? (-:Or be required to use only od to view non-text files? (-:#POSIX #Unix
(DIR) Post #AWf8wMJJgcFyQk4Vto by leah@blahaj.social
2023-06-06T17:01:08Z
1 likes, 0 repeats
@JdeBP @cks having a portable stat(1) would be genuinely useful