Re: some more inline assignments / evaluation wrt POSIX

2007-05-18 Thread Andreas Schwab
Mike Frysinger <[EMAIL PROTECTED]> writes: > testing with bash-3.2p17 here ... > > looking at these statements: > K=dvb0.net A=${K#dvb} echo "$A" > K=dvb0.net A=${K#dvb} ; echo "$A" > K=dvb0.net A=${K#dvb} eval echo '$A' > > shouldnt "0.net" always be displayed ? looks like A is always set proper

some more inline assignments / evaluation wrt POSIX

2007-05-18 Thread Mike Frysinger
testing with bash-3.2p17 here ... looking at these statements: K=dvb0.net A=${K#dvb} echo "$A" K=dvb0.net A=${K#dvb} ; echo "$A" K=dvb0.net A=${K#dvb} eval echo '$A' shouldnt "0.net" always be displayed ? looks like A is always set properly to "0.net", but in the first statement, $A gets expand

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: set function and special builtin set

2007-05-18 Thread Benno Schulenberg
Paul Jarc wrote: > Benno Schulenberg <[EMAIL PROTECTED]> wrote: > > Andreas Schwab wrote: > >> >>ap02.html#tag_02_09_01_01>: > >> > >> If a simple command results in a command name and an > >> optional list of arguments, [...] > >

Re: set function and special builtin set

2007-05-18 Thread Paul Jarc
Benno Schulenberg <[EMAIL PROTECTED]> wrote: > Andreas Schwab wrote: >>: >> >> If a simple command results in a command name and an optional >> list of arguments, [...] > > But set() is not a simple command

Re: set function and special builtin set

2007-05-18 Thread Benno Schulenberg
Andreas Schwab wrote: > Benno Schulenberg <[EMAIL PROTECTED]> writes: > > $ set() { echo "My set $@" ;} > > $ set params > > My set params > > > > It just works. > > It's not supposed to. See >: > > If a s

Re: set function and special builtin set

2007-05-18 Thread Andreas Schwab
Benno Schulenberg <[EMAIL PROTECTED]> writes: > Clive Nicolson wrote: >> Is it posible to get a user function named set to be called in >> place of the special builtin set? >> >> ie >> >> set() { echo "My set $@" ;} >> >> set params > > You haven't tried this? > > $ set() { echo "My set $@" ;} > $

Re: set function and special builtin set

2007-05-18 Thread Benno Schulenberg
Clive Nicolson wrote: > Is it posible to get a user function named set to be called in > place of the special builtin set? > > ie > > set() { echo "My set $@" ;} > > set params You haven't tried this? $ set() { echo "My set $@" ;} $ set params My set params It just works. Also read the output o

Re: bash=~ bug or feature

2007-05-18 Thread Jeff Chua
On Thu, 17 May 2007, Bob Proulx wrote: The behavior has been intentionally changed. Please see Bash FAQ item E14. Ok, thanks. I should have read the FAQ first. Thanks, Jeff. ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailm

set function and special builtin set

2007-05-18 Thread Clive Nicolson
Is it posible to get a user function named set to be called in place of the special builtin set? ie set() { echo "My set $@" ;} set params Thanks Clive ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash