[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Request change to output of declare -f funcname
From: |
Greg Wooledge |
Subject: |
Re: Request change to output of declare -f funcname |
Date: |
Sat, 2 Oct 2021 12:45:13 -0400 |
On Sat, Oct 02, 2021 at 06:06:32PM +0200, Léa Gris wrote:
> Better illustrated how newlines are discarded:
>
> $ sudo bash -c 'echo hello
> echo world'
> > hello
> > world
>
> $ sudo -i bash -c 'echo hello
> echo world'
> > helloecho world
OK, that's news to me. But that looks like a bug in sudo. Asking bash
to change its behavior to work around a bug in some other program seems
like misdirected effort.
unicorn:~$ sudo ~greg/bin/args $'one\ntwo' three
2 args: <one
two> <three>
unicorn:~$ sudo -i ~greg/bin/args $'one\ntwo' three
2 args: <onetwo> <three>
I wonder why it does that. It's not helpful in any situation I can think
of. It's certainly not documented in the -i section of the man page.
Re: Request change to output of declare -f funcname, Andreas Kusalananda Kähäri, 2021/10/02