News for hackers. Stuff that matters.
Re:Which is not Posix by SAI_Peregrinus on Monday November 01, 2021 @10:44PM (#29076287)
Exactly. I've been troubleshooting updating some libraries on an embedded system recently, and running a lot of `/lib/ld-linux.so --list "$(which <executable>)"` on various things to figure out what `-rpath`s I need to pass to the linker. I want the command to fail if I give it a builtin or alias!

Other times I want to use `command`: most often to bypass an alias, but with `-v` mode it's handy to get the definition of an alias.

I suppose `find "$PATH" -name NAME` is roughly equivalent to `which NAME`.

Re:Which is not Posix by pxc on Tuesday November 02, 2021 @12:17AM (#29077015)
Is calling `ld-linux.so` as an executable like that the same thing as calling `ldd`? is there any reason to prefer to invoke it that way?

> I suppose `find "$PATH" -name NAME` is roughly equivalent to `which NAME`.

Only if you're on Fish! Remember that ‘normal’ shells use `:` as the PATH separator :)