Curious case statement error

2016-08-13 Thread pskocik
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKA

Unfamiliar; what does this do: "for file do"..."done"

2016-08-13 Thread L. A. Walsh
I was looking at how the 'ldd' command(bash script) on my system and came across the code usage: for file do ## about line 138 in my version ... case $file in */* : ;; *) file=./$file ;; esac ... done It doesn't appear to set the value of file in any of the code above the 'f

Re: Unfamiliar; what does this do: "for file do"..."done"

2016-08-13 Thread Dennis Williamson
On Aug 13, 2016 6:36 AM, "L. A. Walsh" wrote: > > I was looking at how the 'ldd' command(bash script) on my system and > came across the code usage: > > for file do ## about line 138 in my version > ... > case $file in > */* : > ;; > *) file=./$file > ;; > esac > ... > done >

Re: Unfamiliar; what does this do: "for file do"..."done"

2016-08-13 Thread Chet Ramey
On 8/13/16 7:35 AM, L. A. Walsh wrote: > I was looking at how the 'ldd' command(bash script) on my system and > came across the code usage: > > for file do ## about line 138 in my version "If the in word is omitted, the for command executes list once for each positional parameter tha

Re: Unfamiliar; what does this do: "for file do"..."done"

2016-08-13 Thread L. A. Walsh
Dennis Williamson wrote: There's an implied in "$@" for file in "$@" Hmmm...interesting, thanks, From a very narrow perspective, it doesn't seem very common. ;-) Re: Chet --- Yeah saw that... I think my brain blocked that instance out because it's the sorta the exact opposite of wha

Re: Curious case statement error

2016-08-13 Thread Piotr Grzybowski
Hi, cannot replicate that with 4.4.0(18)-beta2 (latest devel at a4eef1991c25c9d1c55f777952cd522c762c6fc3) I would assume it has been fixed. cheers, pg On 13 Aug 2016, at 12:12, psko...@gmail.com wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 >

Re: Curious case statement error

2016-08-13 Thread Eduardo Bustamante
Character ranges are locale-dependant. Check the values of LC_ALL and LC_COLLATE. Under some locales, the [A-Z] range is actually AaBb..Z. That's why it's better to use the character classes, i.e. [[:alpha:]], [[:lower:]], [[:upper:]], etc. Unless you set the globasciiranges shopt: globasciiran

Re: Curious case statement error

2016-08-13 Thread Petr Skočík
Thanks a a lot. That's useful info. Your suggestions do fix the problem. On 08/13/2016 09:59 PM, Eduardo Bustamante wrote: Character ranges are locale-dependant. Check the values of LC_ALL and LC_COLLATE. Under some locales, the [A-Z] ra

Re: Curious case statement error

2016-08-13 Thread Bob Proulx
psko...@gmail.com wrote: > [a-z]) echo "Character is in Lowercase";; > [A-Z]) echo "Character is in Uppercase";; What is the output of 'locale' for you? It will almost certainly show that your LC_COLLATE is *NOT* set to the C locale but to some other locale. Your statemen