Bug 649 - ash/hush do not expand paths before setting up redirection
Summary: ash/hush do not expand paths before setting up redirection
Status: RESOLVED WONTFIX
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.14.x
Hardware: PC Linux
: P5 enhancement
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-06 03:30 UTC by Mike Frysinger
Modified: 2009-10-06 19:27 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 Mike Frysinger 2009-10-06 03:30:43 UTC
same behavior is observed with ash and hush:
$ rm -rf a
$ mkdir a
$ touch a/f
$ > */f
sh: can't create */f: nonexistent directory
Comment 1 Denys Vlasenko 2009-10-06 16:01:50 UTC
It's a bashism. bash does it only is you run it as "bash"

# bash -c 'rm -rf www; mkdir www; touch www/test; echo Hey >ww*/test; echo $?'
0

# sh -c 'rm -rf www; mkdir www; touch www/test; echo Hey >ww*/test; echo $?'
sh: ww*/test: No such file or directory
1

ash and hush do the same as "bash as sh":

# ash -c 'rm -rf www; mkdir www; touch www/test; echo Hey >ww*/test; echo $?'
ash: can't create ww*/test: nonexistent directory
1

# hush -c 'rm -rf www; mkdir www; touch www/test; echo Hey >ww*/test; echo $?'
hush: can't open 'ww*/test': No such file or directory
1
Comment 2 Mike Frysinger 2009-10-06 19:27:04 UTC
my mistake, i thought path expansion was supposed to occur first