ash: fix a bug in >${varexp} handling. Closes 5282

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2012-06-09 02:06:57 +02:00
parent 37ca36a711
commit f451b2cfe0
3 changed files with 26 additions and 10 deletions

View File

@@ -0,0 +1,2 @@
tmp11
tmp11

View File

@@ -0,0 +1,11 @@
x="tmp11:tmp22"
# Bug was incorrectly expanding variables in >redir
echo "${x%:*}" >"${x%:*}"
echo tmp1*
rm tmp1*
# Also try unquoted
echo "${x%:*}" >${x%:*}
echo tmp1*
rm tmp1*