On Sat, Oct 02, 2021 at 09:09:39AM -0400, Greg Wooledge wrote:
> On Sat, Oct 02, 2021 at 01:41:35PM +0200, Léa Gris wrote:
> > $ declare -f hello
> > 
> > hello ()
> > {
> >     echo 'hello';
> >     echo 'world'
> > }
> > 
> > The issue is that in some circumstances, newline characters may be handled
> > as space, making the function declaration invalid.
> 
> Can you show an example where the output of declare -f is invalid?

I don't think their issue is that the output from declare -f is ever
invalid as such, but that their usage of the resulting text involves
replacing newlines with spaces, which turns it into invalid shell code.

-- 
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden

.

Reply via email to