Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
zwp
on March 7, 2017
|
parent
|
context
|
favorite
| on:
/usr/bin/time: not the command you think you know
I too don't see how it is useful but it's certainly a thing. The Solaris implementation looks like this:
#!/bin/ksh -p # ... cmd=`basename $0` $cmd "$@"
I just noticed that the what(1)-string (I haven't seen on of those for a long time) references "alias.sh", perhaps this is a clue?
#ident "@(#)alias.sh 1.2 00/02/15 SMI"
Were builtins actually aliases in an early shell? I still don't understand how this works though.
tyingq
on March 7, 2017
[–]
That's a funny implementation. It would end up being an infinite loop for any command that wasn't a builtin, or didn't have an identically named thing higher up the PATH. Like if you renamed it from /usr/bin/cd to /usr/bin/mycd.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: