Bug 5498

Summary: ash is incorrect parsing commands containing &>
Product: Busybox Reporter: bugdal
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED INVALID    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Host: Target:
Build:

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"