This is why the `command' and `builtin' builtins exist. The
`command' builtin executes the command supplied as its first
argument, skipping over any function defined with that name. The
`builtin' builtin executes the builtin command given as its first
argument directly.
For example, to write a function to replace `cd' that writes the
hostname and current directory to an xterm title bar, use
something like the following:
cd()
{
builtin cd "$@" && xtitle "$HOST: $PWD"
}
This could also be written using `command' instead of `builtin';
the version above is marginally more efficient.
|
UNIXguide.net
English to Visayan Cebuano Dictionary |
Suggest a Site
Visayan Cebuano to English Dictionary |