|
|
Subscribe / Log in / New account

Debian's which hunt

Debian's which hunt

Posted Oct 29, 2021 21:38 UTC (Fri) by buck (subscriber, #55985)
In reply to: Debian's which hunt by marcH
Parent article: Debian's which hunt

well, /usr/bin/which can't (easily) tell you if something is an alias or shell function, since it's not running in your shell. but the C/tcsh shell builtin `which` or Bourne/Korn/bash builtin `type` can. (sorry to possibly exclude mention of your shell; i just don't have any experience with it)

and, yes, count me in as one of the folks who never knew about the existence of `command` and had always resorted to `type -p` (and will continue to use it for my [occasional] purposes, which is in scripts and not interactive shells, when having `command -v` tell me about an alias isn't gonna work)

as for the matter somebody else raised about fetishizing POSIX, one only has to look at a `configure` script (maybe more so in the past than nowadays, as i guess checks for things like ULTRIX quirks may have gone by the wayside) to find plenty of reasons to be thankful for when an OS or distribution tries to take its cue from a formal or de-facto or what's-everybody-else-doing standard to reduce the heterogeneity when it doesn't add any meaningful value, ... if it's not already too well entrenched. and Linux itself got to be the dominant force it is by using (might-as-well-be) POSIX conformance as the calling card to present to get the door open, for it then to barge in and trample all the other guests


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds