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
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
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 "#!
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
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
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
6 matches
Mail list logo