Re: [SLUG] script error driving me crazy

From: Ronan Heffernan (ronanh@auctionsolutions.com)
Date: Tue Mar 16 2004 - 14:48:16 EST


mrock wrote:

>Fellow Sluggers, I am having a retarded moment with this program I am
>writing. When ever I run it I get an error in the error log that I
>cannot understand. The beginning of the script and part of the error
>log are below. Can anyone see where I have gone wrong?
>
>
>
I am not a shell scripting expert, but I have been bitten by BASH's
pickiness about whitespace around parts of expressions with 'if'. You have:

>if [[$pext - gt 299] - a [$ppext - lt 300] - a [$str -eq 1]] ;
>
Shouldn't there be a space around every bracket?

if [ [ $pext - gt 299 ] - a [ $ppext - lt 300 ] - a [ $str -eq 1 ] ] ;

--ronan

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:21:09 EDT