Since the article doesn't clarify on shell command priority, commands are search in order:
1. Alias expansion.
2. Defined shell functions.
3. Built-in shell functions.
4. Command path.
If you provide an unqualified command that matches more than one of these elements, the first match wins.
Prepending a backstroke: "\command", will inhibit alias expansion. E.g.:
alias date="echo no date"
date
\date
Should return "no date", and your current system date, respectively.
To invoke a system command directly, call the full path. If you don't feel like running the fish shell (not that there's anything wrong with that).
Some simple shells (e.g., dash, and IIRC the original Bourne shell, though that is not what you'll find as /bin/sh on most modern systems) don't include a time builtin, and can invoke the system time command directly.
A command takes a series of arguments, stdin/out/err pipes and returns an error code on completion.
time prefixes a pipeline ( the most basic case being a single command without a pipe into another ), a command block { ... } a subshell block ( ... ), a for statement, an if statement, just whatever really.
This "time" would output how long "a" took to run:
/usr/bin/time a b c | { d e ; f g ; } | h i ;
This "time" outputs how long the pipeline "a", "d", "f", and "h" took to run:
time a b c | { d e ; f g ; } | h i ;
This is a syntax error:
/usr/bin/time { d e ; f g ; }
This returns how long the command group takes to run:
Note the two /usr/bin/time's output their timing information as soon as the first command is done, but the pipeline doesn't return until both commands have exited.
1. Alias expansion.
2. Defined shell functions.
3. Built-in shell functions.
4. Command path.
If you provide an unqualified command that matches more than one of these elements, the first match wins.
Prepending a backstroke: "\command", will inhibit alias expansion. E.g.:
Should return "no date", and your current system date, respectively.To invoke a system command directly, call the full path. If you don't feel like running the fish shell (not that there's anything wrong with that).
Some simple shells (e.g., dash, and IIRC the original Bourne shell, though that is not what you'll find as /bin/sh on most modern systems) don't include a time builtin, and can invoke the system time command directly.