Re: POSIX woes in t7810.87: dash bash or bash dash?
- From
Jeff King <peff@peff.net>
- Date
- Jun 20, 2011, 23:24 UTC
- Message-ID
- <20110620232425.GA617@sigill.intra.peff.net>
- In-Reply-To
- <7voc1sb2hr.fsf@alter.siamese.dyndns.org>
On Mon, Jun 20, 2011 at 02:46:08PM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
> index 69bd576..6379ad6 100755
> --- a/t/t7810-grep.sh
> +++ b/t/t7810-grep.sh
> @@ -658,9 +658,9 @@ test_expect_success LIBPCRE 'grep -P -v pattern' '
> '
>
> test_expect_success LIBPCRE 'grep -P -i pattern' '
> - {
> - echo "hello.c: printf(\"Hello world.\n\");"
> - } >expected &&
> + cat >expected <<-EOF &&
> + hello.c: printf("Hello world.\n");
> + EOFDo you need to quote EOF to suppress expansion in the here document? Both bash and dash seem to pass unknown backslash-escapes like "\n" through unharmed, but I don't know if that is portable (they do both munge known escapes like "\\", of course).
-Peff