HN user

vdm

606 karma
Posts4
Comments542
View on HN

this. which(1) and whereis(1) are not bash, only an approximation or coincidence at best:

  $ type -a which
  which is /usr/bin/which
As a bash built-in, only the type command invokes the installed bash's code path to resolve command words:
  $ type -a type
  type is a shell builtin
  type is /usr/bin/type

  $ help type
  type: type [-afptP] name [name ...]
      Display information about command type.
    
      For each NAME, indicate how it would be interpreted if used as a
      command name.
    
      Options:
        -a  display all locations containing an executable named NAME;
            includes aliases, builtins, and functions, if and only if
            the `-p' option is not also used
        -f  suppress shell function lookup
        -P  force a PATH search for each NAME, even if it is an alias,
            builtin, or function, and returns the name of the disk file
            that would be executed
        -p  returns either the name of the disk file that would be executed,
            or nothing if `type -t NAME' would not return `file'
        -t  output a single word which is one of `alias', `keyword',
            `function', `builtin', `file' or `', if NAME is an alias,
            shell reserved word, shell function, shell builtin, disk file,
            or not found, respectively
    
      Arguments:
        NAME    Command name to be interpreted.
    
      Exit Status:
      Returns success if all of the NAMEs are found; fails if any are not found.

  $ $SHELL --version
  GNU bash, version 5.3.9(1)-release
  $ zdump -Vc 2025,2026 America/New_York
  America/New_York  Sun Mar  9 06:59:59 2025 UT = Sun Mar 9 01:59:59 2025 EST isdst=0 gmtoff=-18000
  America/New_York  Sun Mar  9 07:00:00 2025 UT = Sun Mar 9 03:00:00 2025 EDT isdst=1 gmtoff=-14400
  America/New_York  Sun Nov  2 05:59:59 2025 UT = Sun Nov 2 01:59:59 2025 EDT isdst=1 gmtoff=-14400
  America/New_York  Sun Nov  2 06:00:00 2025 UT = Sun Nov 2 01:00:00 2025 EST isdst=0 gmtoff=-18000

  $ zdump -Vc 2025,2026 Europe/London
  Europe/London  Sun Mar 30 00:59:59 2025 UT = Sun Mar 30 00:59:59 2025 GMT isdst=0 gmtoff=0
  Europe/London  Sun Mar 30 01:00:00 2025 UT = Sun Mar 30 02:00:00 2025 BST isdst=1 gmtoff=3600
  Europe/London  Sun Oct 26 00:59:59 2025 UT = Sun Oct 26 01:59:59 2025 BST isdst=1 gmtoff=3600
  Europe/London  Sun Oct 26 01:00:00 2025 UT = Sun Oct 26 01:00:00 2025 GMT isdst=0 gmtoff=0