weird behaviour of ((count++)) when using , , to change to lower case

2010-08-01 Thread Andrew Benton
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-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/local

Re: weird behaviour of ((count++)) when using , , to change to lower case

2010-08-01 Thread Bernd Eggink
Am 01.08.2010 13:06, schrieb Andrew Benton: Also good. Now try converting it to lower case with ,, andy:~$ count=0 andy:~$ echo "${days[${count}],,}, ${days[$((count++))],,}, ${days[$((count++))],,}" monday, tuesday, thursday What happened to wednesday? I'd rather expect this to print "mond

Re: weird behaviour of ((count++)) when using , , to change to lower case

2010-08-01 Thread Dennis Williamson
If I do the echo line twice, I get a segfault in both Bash 4.0.33(1)-release and 4.1.0(1)-release. And you're right about being evaluated twice. On Sun, Aug 1, 2010 at 3:59 PM, Bernd Eggink wrote: > Am 01.08.2010 13:06, schrieb Andrew Benton: > >> Also good. Now try converting it to lower case w

basic pattern match Question..."newbie" doesn't understand (!...@#$@$)

2010-08-01 Thread Linda Walsh
I have: w="/home/law/bin/package: line 5: type: xx: not found" The =~ operator is suppose to use the RH Expr as a ext.-regex. So why doesn't this match and print "not found"? if [[ $w =~ ".*not found.*" ]]; then echo "not found"; fi It prints nothing. Seems like such a basic concept. Sorr

RFE? request for an "undefined" attribute for functions

2010-08-01 Thread Linda Walsh
I had(have) several functions that I don't use on a regular basis (rarely), that I had put into a subdir "func_lib" under my local-definitions directory. This came from ksh, which allows you to define functions with an "undef" attribute, and at runtime, the first time these functions were refer

Re: basic pattern match Question..."newbie" doesn't understand (!...@#$@$)

2010-08-01 Thread Chris F.A. Johnson
On Sun, 1 Aug 2010, Linda Walsh wrote: I have: w="/home/law/bin/package: line 5: type: xx: not found" The =~ operator is suppose to use the RH Expr as a ext.-regex. So why doesn't this match and print "not found"? if [[ $w =~ ".*not found.*" ]]; then echo "not found"; fi It prints nothing.