[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: K-fest for oz?
Sorry for helping the topic to drift, but I can't help myself! :-)
"Polymorph" <polymorph69@hotmail.com> wrote in message
78480be3-da1a-4210-978f-06929e501d50@a5g2000pre.googlegroups.com">news:78480be3-da1a-4210-978f-06929e501d50@a5g2000pre.googlegroups.com...
>
>#!/bin/ksh
>
>attendees=`currentNumberAttending`
>busy=`busyDuringPeriod --startdate 24/06/2009 --enddate 26/06/2009`
>
>if [ ! $busy ] then
> attendees=`expr $attendees + 1`
>fi
So close - you forgot the semi-colon! :-)
if [ ! $busy ]; then
attendees=`expr $attendees + 1`
fi
Actually, that script would have worked OK in sh (or bash) as well. However,
since you've used ksh:
if [ ! $busy ]; then
let "attendees += 1"
fi
or simply:
[ ! $busy ] && let "attendees += 1"
--
Peter Watson
-- Write to MS-DOS disks on the Apple IIgs?
-- Impossible! ;-)