Re: POSIX woes in t7810.87: dash bash or bash dash?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

Michael J Gruber wrote:

> echo "a\"b\n\"c"
> a"b
> "c
>
> t7810.87 breaks with dash because of this. Escaping the \n does not make
> the test work with both either.

This seems to have slipped by because testing it requires USE_LIBPCRE
to be set.  Thanks for catching it.

> So I'd like to know which one's right
> and (independently) how to make it work for both...

Both are right.  The simplest fix is to use printf, as in

	printf "%s\n" "a\"b\n\"c"

See [1] and [2].

Regards,
Jonathan

[1] http://www.gnu.org/s/hello/manual/autoconf/Limitations-of-Builtins.html#echo
[2] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]