[BusyBox] overriding builtins
Tomi Ollila
Tomi.Ollila at sonera.com
Fri Nov 17 07:07:49 UTC 2000
Thursday Nov 16 16:35:30 -0800 2000 Larry Doolittle <ldoolitt at recycle.lbl.gov> wrote:
> probably not what people expect. I start to think that
> _any_ argv[0] with /'s in it should force a real exec,
> even if that takes us right back to busybox.
That's how other shells do it? right?
I'm reading throught zsh manual page (zshall and searching for `builtin')
to check how zsh can be forced to execute external command instead of a
builtin if one exists. So far I've found one:
command
The command word is taken to be the name of an external
command, rather than a shell function or builtin.
i.e. `command echo foo' will use external echo.
The one i know works with zsh is also `=echo': see,
$ which echo
echo: shell built-in command
$ echo =echo
/usr/bin/echo
The latter one is not portable to other shells, probably the former is
neither.
strip from COMMAND EXECUTION part of zsh manual pages:
If a command name contains no slashes, the shell attempts to
locate it. If there exists a shell function by that name,
the function is invoked as described below in FUNCTIONS. If
there exists a shell builtin by that name, the builtin is
invoked.
Otherwise, the shell searches each element of path for a
directory containing an executable file by that name. If
the search is unsuccessful, the shell prints an error mes-
sage and returns a nonzero exit status.
> - Larry
Tomi
More information about the busybox
mailing list