Re: Compare 2 arrays.

2012-05-30 Thread Dan Douglas
On Wed, May 30, 2012 at 4:57 PM, Greg Wooledge wrote: > > On Wed, May 30, 2012 at 10:14:42AM -0600, Bill Gradwohl wrote: > > What say you Chet? Bug or feature? There is no middle ground. > > That's unrealistic.  There are plenty of things that occupy that middle > ground -- unexpected program beha

Re: Segfault on compound assignment to a variable whose name is set in the environment of a declaration builtin.

2012-05-30 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/18/12 2:08 PM, Dan Douglas wrote: > Hi Chet, segfault occurs during array assignment if an attempt is made to > modify a > variable of the same name from the environment. It appears to only occur in > the global scope. > I imagine the expected r

Bash-4.2 Official Patch 29

2012-05-30 Thread Chet Ramey
BASH PATCH REPORT = Bash-Release: 4.2 Patch-ID: bash42-029 Bug-Reported-by:"Michael Kalisz" Bug-Reference-ID: <50241.78.69.11.112.1298585641.squir...@kalisz.homelinux.net> Bug-Reference-URL: ht

bashref.texi typos

2012-05-30 Thread Andreas Schwab
diff --git a/doc/bashref.texi b/doc/bashref.texi index 19c56c1..9fa99dc 100644 --- a/doc/bashref.texi +++ b/doc/bashref.texi @@ -1795,7 +1795,7 @@ Bash uses the value of the variable formed from the rest of expanded and that value is used in the rest of the substitution, rather than the value of

Re: Compare 2 arrays.

2012-05-30 Thread Bill Gradwohl
On Wed, May 30, 2012 at 10:57 AM, Greg Wooledge wrote: > There are plenty of things that occupy that middle > ground -- unexpected program behaviors. The programmer can never > anticipate *every* input sequence that users will throw at the software, > so some of them may cause surprises. > > Tru

Re: Compare 2 arrays.

2012-05-30 Thread Greg Wooledge
On Wed, May 30, 2012 at 10:14:42AM -0600, Bill Gradwohl wrote: > What say you Chet? Bug or feature? There is no middle ground. That's unrealistic. There are plenty of things that occupy that middle ground -- unexpected program behaviors. The programmer can never anticipate *every* input sequence

Re: Compare 2 arrays.

2012-05-30 Thread Bill Gradwohl
On Wed, May 30, 2012 at 6:33 AM, Greg Wooledge wrote: > > Hacks like this are precisely why I stress that such functions *should > not* be written in bash. If you want to compare two arrays, use a loop, > without wrapping a function around it. That way you have access to the > arrays directly,

Re: Red-Hat Bug 825751 - bash-completion fails on environment variables

2012-05-30 Thread DJ Mills
On Tue, May 29, 2012 at 8:34 AM, John E. Malmberg wrote: > > On this platform, file names with $ in them tend to show up as they have > special meaning. > > BASH-4.2$ echo *\$* > GNV$BASH.DSF GNV$BASH.EXE GNV$BASH.MAP GNV$SHELL.C_FIRST GNV$VERSION.C_FIRST > gnv$bash_startup.com gnv$main_wrapper gn

Re: Compare 2 arrays.

2012-05-30 Thread Greg Wooledge
On Tue, May 29, 2012 at 09:25:02PM -0600, Bill Gradwohl wrote: > I have no idea what the wget's are supposed to be doing, but here's a > function that will compare 2 foreign arrays and return true 0 or false 1. > > compareForeignArrays(){ >## $1 and $2 are the names of the arrays to compare. >