if statement
Karl F. Larsen
klarsen1 at gmail.com
Thu Aug 20 21:02:22 UTC 2009
Raseel wrote:
> On 20-Aug-2009, at 21:59, Ray Parrish <crp at cmc.net> wrote:
>
>
>> Hello,
>>
>> I am having difficulty with an if statement. Here it is -
>>
>> # load the sleep interval in seconds from the command line.
>> interval=$2;
>> # if specified interval in seconds is less than 200 or empty, set
>> it
>> to the default of 300 seconds
>> if [ $interval == "" ]
>>
>> then
>>
>
> Shouldn't this statement be something like :
>
> If [ $interval == "" ] ; then
>
> Aren't you missing the semi-colon here ?
>
> Thanks,
> Raseel
>
>
I got the pdf of Advanced Bash-Scripting and are doing the first few
examples. I suggest you get it and do the same. Very quick education on
bash script writing.
Karl
More information about the ubuntu-users
mailing list