The Wanderer <address@hidden> writes:
> Paul Eggert wrote:
>
>> The Wanderer <address@hidden> writes:
>>
>>> Hmm. Speaking of echo and its requirements, is there any way to
>>> have it print '-n', '-e' or '-E' in an instance where they are not
>>> preceded on the line by anything which is not a recognized option?
>> That's how coreutils echo already behaves, in the latest version.
>
> It doesn't do it for me, with 5.93 - presumably you mean that things
> have changed in the CVS version, which I haven't installed.
Ah, sorry, I misunderstood your request. I thought you meant that
you wanted this behavior, which is the 5.93 behavior:
$ echo a b -n c
a b -n c
But if all you want is an echo that can output any string, you can do this:
s='any string'
echo -n "$s
"
Personally, I suggest using 'printf' rather than 'echo' these days;
it avoids these quirks.