forward 334182 upstream quit On Sun, Oct 16, 2005 at 01:07:12PM +1000, Nathan Hand wrote: > Dash doesn't correctly handle code where a second variable is assigned > in a single statement. For example, this works with bash. > > $ /bin/bash -c 'K=dvb0.net0 A=${K#dvb} ; echo $A' > 0.net0 > > Here is the same line with dash. > > $ /bin/dash -c 'K=dvb0.net0 A=${K#dvb} ; echo $A' > <empty line> > > Inserting semicolons fixes the second assignment. > > $ /bin/dash -c 'K=dvb0.net0 ; A=${K#dvb} ; echo $A' > 0.net0 > > My best guess is that this is a bug in dash.
Hi Nathan, thanks for the report. I'm not sure from reading the standards whether this behavior really is required. I'm forwarding upstream. Hi Herbert, bash, pdks, and posh in unstable do it differently than dash: $ bash -c 'K=dvb0.net0 A=${K#dvb} ; echo $A' 0.net0 $ pdksh -c 'K=dvb0.net0 A=${K#dvb} ; echo $A' 0.net0 $ posh -c 'K=dvb0.net0 A=${K#dvb} ; echo $A' 0.net0 $ dash -c 'K=dvb0.net0 A=${K#dvb} ; echo $A' $ Regards, Gerrit. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]