Re: Running commands from array in a child script

2007-10-26 Thread Paul Jarc
bengoavs <[EMAIL PROTECTED]> wrote: > CMDS=("ls -l > /tmp/log") > ~/child.sh "${CMDS[0]}" > > child.sh: > for i in "$@" > do > if [ "$i" ]; then > echo "$i" > $i Redirections and other special characters are not treated specially if they are produced by a va

Re: Quoted args in an array passed as an option?

2007-10-26 Thread bengoavs
I'm not exactly an expert, but did you try "--define '_smp_mflag -j1'" ? smplx wrote: > > I'm trying to pass on --define '_smp_mflag -j1' (with the quotes intact) > to the rpmbuild command but I can't get it working. Anyone have an idea > what I'm doing wrong? Thanks! > > #!/bin/bash > APPS=(a

Running commands from array in a child script

2007-10-26 Thread bengoavs
Hi guys, kind of a newbie question, so I apologize in advance. First I tried to export an array from one script to it's child, and I figured it's not supported in bash (would be happy if someone can correct me). So I pass the array cells one by one. It works for all commands except for those with

Re: BASh Restrictions on use of "wait" Builtin Excessively Restrictive

2007-10-26 Thread Chet Ramey
Jakub Sadowski wrote: > Machine: i586 > > OS: linux-gnu > > Compiler: gcc > > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-mandriva-linux-gnu' > -DCONF_VENDOR='mandriva' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' > -DSHELL -

Quoted args in an array passed as an option?

2007-10-26 Thread smplx
I'm trying to pass on --define '_smp_mflag -j1' (with the quotes intact) to the rpmbuild command but I can't get it working. Anyone have an idea what I'm doing wrong? Thanks! #!/bin/bash APPS=(app1 app2) [EMAIL PROTECTED] BUILDOPTS_app1=(--with foo --define '_smp_flags -j1') BUILDOPTS_app2="--wit

BASh Restrictions on use of "wait" Builtin Excessively Restrictive

2007-10-26 Thread Jakub Sadowski
Machine: i586 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-mandriva-linux-gnu' -DCONF_VENDOR='mandriva' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I.. -I../include -I