bug-bash
[Top][All Lists]
Advanced

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

Re: Ansi-C backslash expansion: $'n' in a double-quoted string adds sing


From: Chet Ramey
Subject: Re: Ansi-C backslash expansion: $'n' in a double-quoted string adds single-quote newline single-quote
Date: Sat, 03 Sep 2005 12:50:16 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716)

Enrique Perez-Terron wrote:
> Hello,
> 
> The command
> 
>   echo "${PATH//:/$'\n'}"
> 
> yields
> 
>   /usr/bin'
>   '/bin'
>   '/usr/X11R6/bin
> 
> while
> 
>   newline=$'\n'
>   echo "${PATH//:/$newline}"
> 
> yields
> 
>   /usr/bin
>   /bin
>   /usr/X11R6/bin
> 
> Is this by intention?

It certainly doesn't seem intended if the `extquote' option is enabled.
I will take a look.  Thanks for the report.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live Strong.
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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