| Summary: | hush: 'eval' built-in fails on multiline strings | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Kévin PETIT <kpet> |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | RESOLVED INVALID | ||
| Severity: | minor | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.13.x | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Kévin PETIT
2010-12-30 17:37:01 UTC
Current git doesn't have this bug:
$ cat z2
#!/bin/sh
{
echo '#!/bin/sh'
echo 'echo VAR1="val1"'
echo 'echo VAR2="val2"'
} >z1
chmod 755 z1
VAR1="a"
VAR2="b"
echo "before: VAR1='$VAR1'"
echo "before: VAR2='$VAR2'"
eval "`./z1`"
echo "after: VAR1='$VAR1'"
echo "after: VAR2='$VAR2'"
$ ./busybox hush z2
before: VAR1='a'
before: VAR2='b'
after: VAR1='val1'
after: VAR2='val2'
# ./busybox | head -1
BusyBox v1.19.0.git (2010-12-30 23:21:08 CET) multi-call binary.
Thanks for your help Denys. I now know this is considered as a bug. I'll be upgrading if I can't cope with my workaround. I'm closing the bug. |