[hobbit] bb will not run from a shell script (script problem??)
Frank Flynn
frank at declan.com
Thu Sep 6 02:15:39 CEST 2007
OK well I found a work around,
If I break it into two in the script and pass the data to bb through
stdin this will work
----
MYCMD="$BB $BBDISP -"
echo "status $MACHINE.Bd@ $STATUS `date` local web check" | $MYCMD
----
This works for me - but is there a better way?
Thanks,
Frank
On Sep 5, 2007, at 4:01 PM, Frank Flynn wrote:
> I have a simple shell script which I want to use as a client
> plugin. In the script I create the STATUS and some other messages
> that I want to use and assemble them into a CMD.
>
> But bb will not accept this from the script - but the command is
> perfect - I can say that because to debug I echo the command and if
> I copy and paste it works. But if have the script run the $CMD it
> fails.
>
> In the script:
> -----
> MYCMD="$BB $BBDISP \"status $MACHINE.BWEB $STATUS `date` WEB OK\""
>
> echo $MYCMD
>
> $MYCMD
> -----
>
> I run it from inside of bbcmd and I get:
>
> sh-3.1$ ext/webCheck.sh
> /home/hobbit/client/bin/bb 10.1.90.21 "status
> web2,sc1,boredat,net.BWEB green Wed Sep 5 14:55:08 PDT 2007 WEB OK"
> Hobbit version 4.2.0
> Usage: /home/hobbit/client/bin/bb [--debug] [--proxy=http://
> ip.of.the.proxy:port/] RECIPIENT DATA
> RECIPIENT: IP-address, hostname or URL
> DATA: Message to send, or "-" to read from stdin
> sh-3.1$
>
> And if I copy and paste the first line - it works, the server sees
> it and everything is fine.
>
>
>
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>
More information about the Xymon
mailing list