Hello all,
I recently discovered a nice tool within Hobbit, the bbcmd command. As far as I understood it can execute some command and pass environment variables to it. But I just do not catch everything if for i.e. I want to execute the bb-rep.cgi. What must I do?
Insert the environment in a file and then pass to the bbcmd?
Like this?
File content, report.cfg:
BBREP="/home/hobbit/test/"
START-MON=Feb
START-DAY=9
START-YR=2007
END-MON=Feb
END-DAY=16
END-YR=2007
STYLE=crit
Or another way?
And the command: bbcmd -env=report.cfg bb-rep.cgi.
The aim of this is to try to enhance the report script some people in the list have received from. Enhance it in a way that it automatically fetches the .csv file and analyze it. If I come to a solution in some way or another I will make that update script available.
Etienne Marganne
TI Automotive.
The information contained in this transmission may contain privileged and confidential information. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
On Tue, Feb 13, 2007 at 04:27:07PM +0100, Marganne, Etienne wrote:
I recently discovered a nice tool within Hobbit, the bbcmd command. As far as I understood it can execute some command and pass environment variables to it.
Correct, bbcmd reads the hobbitserver.cfg file (by default, you can use another by giving bbcmd the --env=FILENAME option), establishes all of the settings in hobbitserver.cfg as environment variables, and then runs some command.
If you dont specify a command bbcmd will just launch a shell with the environment definitions set.
But I just do not catch everything if for i.e. I want to execute the bb-rep.cgi. What must I do?
bb-rep.cgi is a CGI-based utility, so to run it by hand you must mimick the setup that a webserver provides for CGI programs. I.e. you must set (at least) three environment variables:
REQUEST_METHOD (usually set to "GET") SCRIPT_NAME (the name of the CGI program in the URL, e.g bb-rep.sh) QUERY_STRING (the part of the URL following the '?' sign)
The normal way of doing this would be
REQUEST_METHOD="GET"
SCRIPT_NAME="bb-rep.sh"
QUERY_STRING="START-MON=Feb&START-DAY=9&START-YR=2007&END-MON=Feb&END-DAY=16&END-YR=2007&STYLE=crit"
bbcmd bb-rep.cgi
Regards, Henrik
participants (2)
-
emarganne@be.tiauto.com
-
henrik@hswn.dk