William Park wrote:
>
> Description:
> 'declare -p' adds backslash (\) in front of newline. When this
> is fed back, the newline disappears. Should this happen?
>
> Repeat-By:
> 0 node1:~$ a='11
> > 22'
> 0 node1:~$ declare -p a
> declare -- a="11\
> 22"
>
> 'declare -p' supposed to print stuffs that can be fed back. So,
> when it is fed back, the newline disappears.
>
> 0 node1:~$ declare b="11\
> > 22"
> 0 node1:~$ declare -p b
> declare -- b="1122"
That behavior is correct -- backslash-newline disappears unless it
appears within single quotes. The problem is that the newline is
being quoted in the declare output. I will take a look.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
[Prev in Thread]
Current Thread
[Next in Thread]
Re: LF becomes BACKSLASH LF in 'declare -p',
Chet Ramey<=