Re: $\n doesn't get expanded between double-quotes

2009-07-06 Thread Greg Wooledge
On Fri, Jul 03, 2009 at 01:01:47PM -0400, Chris F.A. Johnson wrote: > NL=$'\n' > string="This is a$NLmulti-line$NLstring" Of course you would need curly braces for that. NL=$'\n' string="This is a${NL}multi-line${NL}string"

Re: $\n doesn't get expanded between double-quotes

2009-07-03 Thread Chet Ramey
Richard Neill wrote: > This is still a missing feature: how to embed newlines in double-quoted > bash string assignment: > > For example, if I want to write: > > EMAIL_BODY="Dear $NAME,$'\n\n'Here are the log-files for > $(date)$'\n\n'Regards,$'\n\n'$SENDER" > > then this doesn't work. There ar

Re: $\n doesn't get expanded between double-quotes

2009-07-03 Thread Chet Ramey
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 say

Re: $\n doesn't get expanded between double-quotes

2009-07-03 Thread Dave B
On Friday 03 July 2009, Richard Neill wrote: > > X=$'a\nb c' > > This is still a missing feature: how to embed newlines in double-quoted > bash string assignment: > > For example, if I want to write: > > EMAIL_BODY="Dear $NAME,$'\n\n'Here are the log-files for > $(date)$'\n\n'Regards,$'\n\n'$SENDE

Re: $\n doesn't get expanded between double-quotes ['PureMessage.Watchdog': checked]

2009-07-03 Thread Chet Ramey
fsc-log-...@richardneill.org wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i486 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' > -DCONF_VENDOR=

Re: $\n doesn't get expanded between double-quotes

2009-07-03 Thread Chris F.A. Johnson
On Fri, 3 Jul 2009, Richard Neill wrote: > > > Description: > > > Bash allows escape characters to be embedded by using the $'\n' > > > syntax. However, unlike all other $variables, > > > this doesn't work with embedded newlines. I think it should. > > > > > > Repeat-By: > > > X="a$'\

Re: $\n doesn't get expanded between double-quotes

2009-07-03 Thread Andreas Schwab
Richard Neill writes: > This is still a missing feature: how to embed newlines in > double-quoted bash string assignment: Literal newlines work just fine. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for so

Re: $\n doesn't get expanded between double-quotes

2009-07-03 Thread Richard Neill
Thanks for your reply. Description: Bash allows escape characters to be embedded by using the $'\n' syntax. However, unlike all other $variables, this doesn't work with embedded newlines. I think it should. Repeat-By: X="a$'\n'b c" echo "$X" expect to

Re: $\n doesn't get expanded between double-quotes

2009-07-02 Thread Chris F.A. Johnson
On Fri, 3 Jul 2009, fsc-log-...@richardneill.org wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i486 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-g

$\n doesn't get expanded between double-quotes ['PureMessage.Watchdog': checked]

2009-07-02 Thread fsc-log-rjn
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='ba