Not sure why the outcome of "`which` is not POSIX" would be "essentially everybody should stop using `which` and start using `command -v`, which is poorly known, has different semantics, and is covered in relatively little introductory material" rather than "this is just another example of why POSIX has been nearly irrelevant for a long time now". systemd is not POSIX, either, but that's not taken as some justificati…
Which is not Posix
21–30 of 97 posts
Re: Which is not Posix
#22Unless you doing alternative micro meta alpine docker images, this has no importance whatsoever.
Re: Which is not Posix
#23Yeah, no thanks, I'm going to keep using `which`, and distributions are going to support it, no matter how "standard" `command -v` is. The only reason we're talking about this is that it's so noteworthy that any distro would seriously suggest people avoid `which`, which is the de facto standard.
Re: Which is not Posix
#24Re: Which is not Posix
#25let's collectively mark POSIX as deprecated and move on
Re: Which is not Posix
#26Not sure why the outcome of "`which` is not POSIX" would be "essentially everybody should stop using `which` and start using `command -v`, which is poorly known, has different semantics, and is covered in relatively little introductory material" rather than "this is just another example of why POSIX has been nearly irrelevant for a long time now". systemd is not POSIX, either, but that's not taken as some justificati…
As for systemd, AFAIK system startup isn't covered by POSIX at all, so bsd init, sysv init and systemd are all equally not covered by POSIX. Which is fine, POSIX was never meant to cover every single behavior of an OS, but rather a sort of least common denominator to make porting easier (not "make porting non-existent").
Re: Which is not Posix
#27Not sure why the outcome of "`which` is not POSIX" would be "essentially everybody should stop using `which` and start using `command -v`, which is poorly known, has different semantics, and is covered in relatively little introductory material" rather than "this is just another example of why POSIX has been nearly irrelevant for a long time now". systemd is not POSIX, either, but that's not taken as some justificati…
Re: Which is not Posix
#28Yeah, no thanks, I'm going to keep using `which`, and distributions are going to support it, no matter how "standard" `command -v` is. The only reason we're talking about this is that it's so noteworthy that any distro would seriously suggest people avoid `which`, which is the de facto standard.
There are enough dists which don't support which.
Re: Which is not Posix
#29 #!/bin/bash
type -pa "$@" | head -n 1 ; exit ${PIPESTATUS[0]}
Just save it as which, chmod +x and add to path.https://www.linuxfromscratch.org/blfs/view/svn/general/which...
Re: Which is not Posix
#30let's collectively mark POSIX as deprecated and move on
It's better to create a «PWG» (POSIX Working Group), which then publish POSIX2021, POSIX2026, and so on.
* https://en.wikipedia.org/wiki/Austin_Group
* https://www.opengroup.org/austin/
* https://www.austingroupbugs.net/main_page.php
* https://www.mail-archive.com/austin-group-l@opengroup.org/ma...
There are drafts available for a 202x revision (have to register an account).
See also: