HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] FaxDispatch logic help
Ok, that's all I was really worried about. Thanks for the syntax check.
Jason
..·><((((º>
> -----Original Message-----
> From: Chris Taylor [mailto:chris.taylor@xxxxxxxxxxxxx]
> Sent: Friday, May 18, 2007 10:41 AM
> To: Jason Staudenmayer
> Cc: Hylafax Mailling List
> Subject: Re: [hylafax-users] FaxDispatch logic help
>
>
> Jason Staudenmayer wrote:
> > I've been search for some examples but I'm not finding many.
> > I'm finally setting up my dispatch script and so far I'm
> just using a case for SENDER. What I'd like to do is also
> route other faxes by CIDNUMBER.
> > I just want to make sure that no faxes are lost or double
> emails are send. Below is what I have so far:
> >
> > case $SENDER in
> >
> > *305*243*5662*) SENDTO="health@xxxxxxxxxxxxx";;
> >
> > *) SENDTO=faxin@xxxxxxxxxxxxx;;
> >
> >
> > esac
> >
> > case $CIDNUMBER in
> >
> > *215*368*1960*) SENDTO="rigan@xxxxxxxxxxxxxxx";;
> >
> > *) SENDTO=faxin@xxxxxxxxxxxxx;;
> >
> > esac
> >
> > My question is do I only need the catch-all in the last
> case or should each case have it?
> >
> > I think I might feel a bit more comfortable with if-then
> but I'm not sure if that would be easier to maintain and I
> have seen no examples on the web.
> >
> > Jason
> > ..·><((((º>
> >
> >
>
> Every different case needs the *) entry.
> Case statements are basically a looped if then.. You may have come
> across them as switch statements in java (i think).
>
> Just remember to not do the catchall more than once per case.
>
> Your syntax looks fine to me.
>
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*