Re: long command executed via a variable fails (SOLVED)

2004-11-18 Thread Geoffrey KRETZ
Thx to Igor and Reini for their help. My shell script works on UNIX and windows via Cygwin now. The good syntax is the one given by Igor : if ! eval "$cmd"; then . Geoffrey Geoffrey KRETZ wrote: Actually my original unix script use : if ! $cmd; then ... fi AND if ! eval $cmd; then ... fi And

Re: long command executed via a variable fails

2004-11-17 Thread Geoffrey KRETZ
Actually my original unix script use : if ! $cmd; then ... fi AND if ! eval $cmd; then ... fi And it works perfectly I'm forced to use eval because I'm of the structure of my $cmd variable. Just a few samples : - cmd="$LDPRELOAD $FGLRUN ${mainname}.42r -db $dbname -dt $dbtype -ho $QAHOST $dvmversi

Re: long command executed via a variable fails

2004-11-17 Thread Reini Urban
Geoffrey KRETZ schrieb: Reini Urban wrote: FAQ: http://cygwin.com/faq/faq_3.html#SEC43 cygwin's /bin/sh is ash, on most other platforms it is /bin/bash. If you want it to behave it exactly like on other platforms, and you use bash specific constructs, use the /bin/bash shebang. If I specified "#!

Re: long command executed via a variable fails

2004-11-17 Thread Geoffrey KRETZ
Reini Urban wrote: Geoffrey KRETZ schrieb: I've got a problem with a shell script used with Cygwin 1.5.10-3 on W2000 SP4 and W XP SP 2. The following part of code works on all the Unix I've tested (HP-UX/AIX/Sun Solaris/Linux). With Cygwin, it doesn't :( *Code:* cmd="long shell command with di

Re: long command executed via a variable fails

2004-11-17 Thread Igor Pechtchanski
On Wed, 17 Nov 2004, Reini Urban wrote: > Geoffrey KRETZ schrieb: > > I've got a problem with a shell script used with Cygwin 1.5.10-3 on W2000 > > SP4 and W XP SP 2. > > > > The following part of code works on all the Unix I've tested (HP-UX/AIX/Sun > > Solaris/Linux). > > > > With Cygwin, it do

Re: long command executed via a variable fails

2004-11-17 Thread Reini Urban
Geoffrey KRETZ schrieb: I've got a problem with a shell script used with Cygwin 1.5.10-3 on W2000 SP4 and W XP SP 2. The following part of code works on all the Unix I've tested (HP-UX/AIX/Sun Solaris/Linux). With Cygwin, it doesn't :( *Code:* cmd="long shell command with differents parameters