Nicolas> The arguments are supplied *to the shell*.
Nicolas> Do you agree in closing this bug?
Ok.
Nicolas> su root -c "$@" may be a replacement, but it will fail
Nicolas> sometimes.
That's what I started with ;-( I had a script "suc" approximately
as follows:
exec su root -c "$*"
but of course that fails on a command like
find . --name "*.foo"
because the subshell will expand the wildcard before passing it to find.
Before you suggest quoting by hand, that's just what I meant by "such a
pain". You lose all the bash/readline/history benefits that way.
Any other way to execute a command as root (assuming I have the
privileges) without an intermediate shell?
--
She had a passion for anyone who could do anything really well.
... "Not for an engineer, not for a technician!"
Mikhail Bulgakov, The Master & Margarita
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]