diff options
author | Ron Yorston | 2016-04-03 22:43:14 +0100 |
---|---|---|
committer | Denys Vlasenko | 2016-04-15 22:16:46 +0200 |
commit | 84ba50c32f7dbfccddd5c5ca34d48d97c3f72193 (patch) | |
tree | dd2120def41d29e64d3a469edb26ece02f45724b /shell/ash_test/ash-heredoc | |
parent | 2b91958dff0b7bae83cf2c3f2db55bd248fe0956 (diff) | |
download | busybox-84ba50c32f7dbfccddd5c5ca34d48d97c3f72193.zip busybox-84ba50c32f7dbfccddd5c5ca34d48d97c3f72193.tar.gz |
ash: bash-compatible $'...' shouldn't expand in double quotes
Bash doesn't expand its $'...' construct in double quotes:
$ echo "$'a\tb'"
$'a\tb'
Change BusyBox ash to do the same. This also fixes a problem with
here documents where BusyBox ash gave an incorrect result for:
$ cat <<EOF
> '$'
> EOF
'$'
Reported-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-heredoc')
-rw-r--r-- | shell/ash_test/ash-heredoc/heredoc4.right | 1 | ||||
-rwxr-xr-x | shell/ash_test/ash-heredoc/heredoc4.tests | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/shell/ash_test/ash-heredoc/heredoc4.right b/shell/ash_test/ash-heredoc/heredoc4.right new file mode 100644 index 0000000..371b092 --- /dev/null +++ b/shell/ash_test/ash-heredoc/heredoc4.right @@ -0,0 +1 @@ +'$' diff --git a/shell/ash_test/ash-heredoc/heredoc4.tests b/shell/ash_test/ash-heredoc/heredoc4.tests new file mode 100755 index 0000000..642ddb3 --- /dev/null +++ b/shell/ash_test/ash-heredoc/heredoc4.tests @@ -0,0 +1,3 @@ +cat <<EOF +'$' +EOF |