bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LF becomes BACKSLASH LF in 'declare -p'


From: Chet Ramey
Subject: Re: LF becomes BACKSLASH LF in 'declare -p'
Date: Fri, 01 Jul 2005 13:16:56 -0400
User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]