Chris Davies writes:
[...]
>> What can I do to avoid this kind of silliness? What kind of
>> environment variable would even tell sudo about bash builtins?
>
> There isn't one. You can't use bash builtins like that in any
> command. Instead, you should consider a construct like this:
>
> su
Harry Putnam wrote:
> I find sudo to be particularly ill informed at times.
> sudo for ii in 1 2 3;do echo $ii;done
> bash: syntax error near unexpected token `do'
> It doesn't know about bash builtins.
Why should it?
> Adding the -E flag (preserve environment) doe not help at all.
> sud
On Thu, Oct 13, 2011 at 03:58:24PM +0100, Chris Davies wrote:
> Harry Putnam wrote:
> > I find sudo to be particularly ill informed at times.
>
> > sudo for ii in 1 2 3;do echo $ii;done
> > bash: syntax error near unexpected token `do'
I suspect the problem here is, perhaps not that sudo does
I find sudo to be particularly ill informed at times.
For example: Attempting to run a `for' loop
as user:
for ii in 1 2 3;do echo $ii;done
1
2
3
as sudoer:
sudo for ii in 1 2 3;do echo $ii;done
bash: syntax error near unexpected token `do'
It doesn't know about bash builtins.
Adding t
4 matches
Mail list logo