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] jobcontrol script not working



On 1/8/08, Lee Howard <faxguy@xxxxxxxxxxxxxxxx> wrote:
> One useful little shell scripting trick that I use for debugging is this...
>
> At the beginning of the script, after the shebang (#!/bin/sh)... put this:
>
> set -x
> exec 2> /tmp/mydebugfile$$.out
>
> And then you re-run the process that will trigger that shell script.
> This will send the -x output to the /tmp/mydebugfile<pid>.out file.
> Then you can open up that file and watch the script execution to see
> what the problem is.

Thanks for the tip. I got the script working now, it was a bit weird.
The output yielded

mailaddr='\''george@xxxxxxxxxxxx'\''
sender='\''George H'\''

++ mailaddr=george@xxxxxxxxxxxx
++ sender='George H'

And what actually worked in the jobcontrol script was

case "$mailaddr" in
     'george@xxxxxxxxxxxx') echo "Modem: ttyS0";;
     'faxadmin@xxxxxxxxxxxx') echo "Modem: ttyS1";;
     *) echo "Modem: any";;
esac

Adding the single quotes made the difference.
Thanks
-- 
"Nothing is impossible for the person that doesn't have to do it"
"The probability of anything happening is in inverse ratio to its desirability"
--
George H
george.dma@xxxxxxxxx


____________________ 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*




Project hosted by iFAX Solutions