[bash-3.2.39] race condition on AIX when using libtool with bash

2008-07-30 Thread Michael Haubenwallner
Hi,

have some strange race condition here on aix5.3 with bash-3.2.39, when
using CONFIG_SHELL=/path/to/bash, building in parallel (-j16) with
libtool. It works when using /bin/ksh.

Sporadically there are two lines missing in the libtool-generated
'file.lo', while other files in the same build directory contain these
lines. The broken files are different ones amongst different runs of the
same package build - and sometimes it does not happen at all.

The missing lines are from this command sequence in libtool-1.5.26:

http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=blob;f=ltmain.in;h=48facb91640a8fd43ad0e7ce4139ec0ccb4bfa09;hb=branch-1-5#l1004
1004   test -z "$run" && cat >> ${libobj}T 

function name bug ?

2008-07-30 Thread christophe malvasio
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/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -g -O2
uname output: Linux xyz 2.6.26-paldo4-x86_64 #1 SMP PREEMPT Sun Jul 27
21:05:14 CEST 2008 x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu

Bash Version: 3.2
Patch Level: 33
Release Status: release

Description:
 cbz (){ echo "why 'cbz' not a valid function name ?";}
bash: syntax error near unexpected token `('
abz,caz and cba work
thanks


Re: function name bug ?

2008-07-30 Thread Paul Jarc
"christophe malvasio" <[EMAIL PROTECTED]> wrote:
>  cbz (){ echo "why 'cbz' not a valid function name ?";}
> bash: syntax error near unexpected token `('

It works for me.  What does "alias cbz" say for you?


paul




Re: function name bug ?

2008-07-30 Thread Chris F.A. Johnson
On 2008-07-31, christophe malvasio wrote:
> 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/locale' -DPACKAGE='bash'
> -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -g -O2
> uname output: Linux xyz 2.6.26-paldo4-x86_64 #1 SMP PREEMPT Sun Jul 27
> 21:05:14 CEST 2008 x86_64 GNU/Linux
> Machine Type: x86_64-unknown-linux-gnu
>
> Bash Version: 3.2
> Patch Level: 33
> Release Status: release
>
> Description:
>  cbz (){ echo "why 'cbz' not a valid function name ?";}
> bash: syntax error near unexpected token `('
> abz,caz and cba work

  Do you have an alias named 'cbz'? If so, unalias it before
  defining the function.

-- 
   Chris F.A. Johnson, webmaster 
   ===
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


Re: set -x output of test operator is irretating

2008-07-30 Thread Chet Ramey

Toralf Förster wrote:


Bash Version: 3.2
Patch Level: 33
Release Status: release

Description:
I'm wondering why in the example (see below) the right side is prefixed 
with a '\' wheras the left side is unchanged.

Repeat-By:
[EMAIL PROTECTED] ~ $ echo "1 2 3 4" | while read a b c d; do [[ "$a" = "$b" || "$a" = "$c" || 
"$a" = "$d" ]] && echo oops; done
+ read a b c d
+ echo '1 2 3 4'
+ [[ 1 = \2 ]]
+ [[ 1 = \3 ]]
+ [[ 1 = \4 ]]
+ read a b c d
++ echo -ne '\033]0;[EMAIL PROTECTED]:~\007'


Because the ==/!=/= operators are defined to match the rhs as a pattern
unless it's quoted.  You quoted the original string, and the `set -x'
output is supposed to be re-usable as input, so the trace output is
quoted appropriately.

Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/




Re: function name bug ?

2008-07-30 Thread christophe malvasio
2008/7/31 Paul Jarc <[EMAIL PROTECTED]>

> "christophe malvasio" <[EMAIL PROTECTED]> wrote:
> >  cbz (){ echo "why 'cbz' not a valid function name ?";}
> > bash: syntax error near unexpected token `('
>
> It works for me.  What does "alias cbz" say for you?
>
>
> paul
>
alias work
are you in x86 ?