Am 2005-12-01 15:23:32, schrieb Louie Miranda:
> if [ "$CAT_XML_CHECK" -gt "0" ]
here you need a "then"
> echo "more than zero"
>
> fi
>
> if [ -d "$XML_NETWORK_SHARE" ]
> then
> cp $XMLPARSEDFILES/*.xml $XML_FOR_TRANSFER
> cp $XMLPARSEDFILES/*.x
--- Paul Smith <[EMAIL PROTECTED]> wrote:
> if [ ... ];
> then command;
> else other_command;
> fi
I much prefer:
[ ... ] &&
{
foo
} || {
bar
}
-- Thomas Adam
___
To help you stay safe and secure
%% Joachim Fahnenmüller <[EMAIL PROTECTED]> writes:
jf> It should read:
jf> if [ ... ];
jf> then command;
jf> else other_command;
jf> fi
jf> (mind the semicolons!)
Actually, you don't need ANY of those semicolons.
Bourne syntax is very regular, so it's pretty easy to know when
On Thu, Dec 01, 2005 at 03:23:32PM +0800, Louie Miranda wrote:
> Im having troubles on my shell script. When i run it, im having this errors.
>
> ./runXML3.sh: line 18: syntax error near unexpected token `fi'
> ./runXML3.sh: line 18: `fi'
>
> Im a bit confused how to overcome the problem here. I
Louie;
Hmm. I usually run kshell, so this might not be correct.
You need a then after the first if.
you need [[ ]] not just one bracket.
At 03:23 PM 12/1/2005 +0800, Louie Miranda wrote:
>Im having troubles on my shell script. When i run it, im having this errors.
>
>
>
>
>
>./runXML3.sh: line
Hi!
Maybe the missing "then" after the previous "if" is
the problem!
Krizsán László
Hungary
- Original Message -
From:
Louie Miranda
To: Debian-User
Sent: Thursday, December 01, 2005 8:23
AM
Subject: Shell Script (If and Else)
problem
6 matches
Mail list logo