From: Florian Kaufmann on
Sorry - I don't get it to work. There shouldn't be any empty lines
anywhere.
From: pk on
On Monday 21 April 2008 12:54, Florian Kaufmann wrote:

>> Well, since the <<< construct accepts strings *only on the same line*, I
>
> Why you think is that so?
>
> $ cat <<< 'hello
>> test'
> hello
> test

Ok, sorry, bad wording. I meant the construct accepts only a single string,
which may contain newlines of course. Still, since there is no explicit
ending delimiter (unlike in <<), I think it would be difficult, with the
current syntax, for the shell to understand whether the user wants the
trailing \n or not.

--
All the commands are tested with bash and GNU tools, so they may use
nonstandard features. I try to mention when something is nonstandard (if
I'm aware of that), but I may miss something. Corrections are welcome.
From: pk on
On Monday 21 April 2008 13:03, pk wrote:

> Ok, sorry, bad wording. I meant the construct accepts only a single
> string, which may contain newlines of course. Still, since there is no
> explicit ending delimiter (unlike in <<), I think it would be difficult,
> with the current syntax, for the shell to understand whether the user
> wants the trailing \n or not.

And, what the OP wants is not possible with the traditional here-document
(<<) either, despite the explicit terminator, since it must be on a single
line by itself, and thus the previous line must end with a \n.

--
All the commands are tested with bash and GNU tools, so they may use
nonstandard features. I try to mention when something is nonstandard (if
I'm aware of that), but I may miss something. Corrections are welcome.