[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bb will not run from a shell script (script problem??)
- To: hobbit (at) hswn.dk
- Subject: bb will not run from a shell script (script problem??)
- From: Frank Flynn <frank (at) declan.com>
- Date: Wed, 5 Sep 2007 16:01:48 -0700
- References: <29f517690709050643j7e7a1fden299061b755c0f834 (at) mail.gmail.com> <20070905151152.GA22073 (at) hswn.dk> <29f517690709050845u39887165p894beec3aeca431d (at) mail.gmail.com> <29f517690709051015y5ed276f0n988e80dda7651404 (at) mail.gmail.com> <20070905204726.GB26899 (at) hswn.dk>
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.