Bug 5498 - ash is incorrect parsing commands containing &>
Summary: ash is incorrect parsing commands containing &>
Status: RESOLVED INVALID
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-02 20:10 UTC by bugdal
Modified: 2012-09-03 10:58 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugdal 2012-09-02 20:10:49 UTC
Consider for example the command:

    echo hello &> world

In both bash and Busybox ash, this command results in the synchronous execution of echo with its output directed to a file named world. However, per the shell grammar, the & should be interpreted as a separator_op, i.e. the complete command is a list, separated by the & operator, where the first simple command echo hi is run in the background and the second simple command is a pure redirection which creates an empty file named world.
Comment 2 Denys Vlasenko 2012-09-03 10:58:09 UTC
Set CONFIG_ASH_BASH_COMPAT to "no"