Re: variable assignments and parameter expansion in a single command

2007-05-20 Thread Chet Ramey
Kevin F. Quinn wrote: > Following a discussion we had earlier this year regarding the order of > evaluation of variables and variable assignments: > > $ A="moo" B="$A more" env |grep ^B > B=moo more > > (rather than showing just 'B= more') > the dash maintainer has highlighted the following: >

Re: variable assignments and parameter expansion in a single command

2007-05-18 Thread Kevin F. Quinn
Following a discussion we had earlier this year regarding the order of evaluation of variables and variable assignments: $ A="moo" B="$A more" env |grep ^B B=moo more (rather than showing just 'B= more') the dash maintainer has highlighted the following: $ bash -c 'K=dvb0.net0 A=${K#dvb} eva

Re: variable assignments and parameter expansion in a single command

2007-03-26 Thread Kevin F. Quinn
On Sun, 25 Mar 2007 12:26:32 +0200 "Kevin F. Quinn" <[EMAIL PROTECTED]> wrote: > FWIW I tried also /usr/xpg4/bin/sh (with the Belenix livecd, SunOS > 5.11) and that shows the same as sh/ash/dash/bb. FI just tried on SunOS 5.8 (sparc) - a proper Sun installation - and /usr/xpg4/bin/sh there shows

Re: variable assignments and parameter expansion in a single command

2007-03-25 Thread Kevin F. Quinn
On Sat, 24 Mar 2007 19:32:35 -0400 Chet Ramey <[EMAIL PROTECTED]> wrote: > Kevin F. Quinn wrote: > > my interpretation of > > "variable assignment" is the `A=' part of the statement; i.e. that > > the rhs of the assignment is expanded. > > It's not; the entire word, including the portion after th

Re: variable assignments and parameter expansion in a single command

2007-03-24 Thread Chet Ramey
Kevin F. Quinn wrote: > On Sat, 24 Mar 2007 14:23:39 -0400 > Chet Ramey <[EMAIL PROTECTED]> wrote: > >> Mike Frysinger wrote: >>> i'm trying to determine whether POSIX allows for utilizing of >>> variables in simple commands that were defined earlier in the same >>> command ... in other words, whe

Re: variable assignments and parameter expansion in a single command

2007-03-24 Thread Kevin F. Quinn
On Sat, 24 Mar 2007 14:23:39 -0400 Chet Ramey <[EMAIL PROTECTED]> wrote: > Mike Frysinger wrote: > > i'm trying to determine whether POSIX allows for utilizing of > > variables in simple commands that were defined earlier in the same > > command ... in other words, whether this snippet: > > unset

Re: variable assignments and parameter expansion in a single command

2007-03-24 Thread Chet Ramey
Mike Frysinger wrote: > i'm trying to determine whether POSIX allows for utilizing of variables in > simple commands that were defined earlier in the same command ... in other > words, whether this snippet: > unset A B > A="moo" B="$A more" > echo $A , $B > should display moo twice or just once:

Re: variable assignments and parameter expansion in a single command

2007-03-24 Thread Andreas Schwab
Mike Frysinger <[EMAIL PROTECTED]> writes: > i'm trying to determine whether POSIX allows for utilizing of variables in > simple commands that were defined earlier in the same command ... in other > words, whether this snippet: > unset A B > A="moo" B="$A more" > echo $A , $B > should display mo