Bug#334182: dash doesn't assign second variable in a single statement

2005-10-29 Thread Herbert Xu
On Fri, Oct 28, 2005 at 08:54:40AM +, Gerrit Pape wrote:
 
 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'
  
  $ 

I agree.  It makes sense to do it like bash.

However, it seems that even bash/pdksh don't agree on the finer
details:

$ bash -c 'a=/bin PATH=$a ls /dev/null'
bash: line 1: ls: No such file or directory
$ pdksh -c 'a=/bin PATH=$a ls /dev/null'
/dev/null
$

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#334182: dash doesn't assign second variable in a single statement

2005-10-28 Thread Gerrit Pape
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]



Bug#334182: dash doesn't assign second variable in a single statement

2005-10-15 Thread Nathan Hand
Package: dash
Version: 0.5.2-8
Severity: normal


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.


-- System Information:
Debian Release: testing/unstable
  APT prefers breezy
  APT policy: (500, 'breezy'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages dash depends on:
ii  libc6 2.3.5-3GNU C Library: Shared libraries an

dash recommends no packages.

-- debconf information:
* dash/sh: true


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]