Re: Shell Script (If and Else) problem

2005-12-06 Thread Michelle Konzack
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

Re: Shell Script (If and Else) problem

2005-12-01 Thread Thomas Adam
--- 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

Re: Shell Script (If and Else) problem

2005-12-01 Thread Paul Smith
%% 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

Re: Shell Script (If and Else) problem

2005-12-01 Thread Joachim Fahnenmüller
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

Re: Shell Script (If and Else) problem

2005-12-01 Thread Craig M. Houck
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

Re: Shell Script (If and Else) problem

2005-11-30 Thread Krizsán László
 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