GNU bug report logs -
#56050
[PATCH] home: services: environment-variables: Fix XDG base directories.
Previous Next
Full log
View this message in rfc822 format
"Philip McGrath" <philip <at> philipmcgrath.com> skribis:
> AFAICT, this seems to work. I think this is because of a rule I didn't know about before from the section "Here Documents" under `info "(bash)Redirections"`:
>
>> If any part of *word* is quoted, the *delimiter* is the result of
>> quote removal on *word*, and the lines in the here-document
>> are not expanded.
>
> and the beginning EOF is quoted, so it works like this:
>
> $ cat quoted-here-doc.sh
> #!/bin/sh
> cat <<"EOF" > out.sh
> export PATH="$PATH:foobar"
> EOF
> $ ./quoted-here-doc.sh
> $ cat out.sh
> export PATH="$PATH:foobar"
>
> I'm certainly no expert on shell quoting, though.
Woow, I learned something, thanks! Crazy. (I wonder what Dash does
with that, given that it doesn’t support multi-digit file descriptor
numbers for redirects…)
Ludo’.
This bug report was last modified 2 years and 165 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.