Re: "shopt -s extglob" inside of a function does not work

2006-02-02 Thread Chet Ramey
Michael Wang wrote: > " > line 5: syntax error in conditional expression: unexpected token `(' > line 5: syntax error near `@(a' > line 5: `if [[ "a" == @(a) ]]' > " > > when run under bash. I believe it should not because "extglob" > is enabled inside the function. If I run the script inside the

add support for ${array[#]} syntax ?

2006-02-02 Thread Mike Frysinger
every once in a while i want to get the # of elements in an array and i always type ${array[#]} to get at it (following the behavior of [EMAIL PROTECTED] and ${array[*]}) ... then i remember that the proper syntax is [EMAIL PROTECTED] (or someone else reminds me) is there a reason that ${array

make 'tr' (or something like it) a bash builtin ?

2006-02-02 Thread Mike Frysinger
if i'm simply unaware of such bash features, please feel free to yell at me :) when working on misc bash scripts, i semi-frequently find the need to do some sort of string processing along the lines of say changing a string to all upper case or lower case ... if 'tr' was a bash builtin, then tha

Re: make 'tr' (or something like it) a bash builtin ?

2006-02-02 Thread Chris F.A. Johnson
On Thu, 2 Feb 2006, Mike Frysinger wrote: if i'm simply unaware of such bash features, please feel free to yell at me :) when working on misc bash scripts, i semi-frequently find the need to do some sort of string processing along the lines of say changing a string to all upper case or lower ca