Chris F.A. Johnson wrote: > On Fri, 3 Jul 2009, fsc-log-...@richardneill.org wrote:
>> Fix: >> $'\n' should be expanded within double-quotes, like other variables >> are. >> Otherwise, please correct the man-page to make it clearer. > > $'\n' is not a variable. As the man page says: > > Words of the form $'string' are treated specially. > > Note "Words". Inside double quotes, $'\n' is not a word. Richard is correct that the manual page does not quite represent the current behavior accurately. I think that replacing "Words" with "Unquoted strings" or "Unquoted substrings" or even "Single-quoted strings preceded by an unquoted '$' are treated specially." might be better. For instance, you can use X=a$'\n'b ; echo "$X" or echo a$'\n'b to obtain the results Richard wants, and the ansi-c quoted portions of the strings are not words. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/