1 of 1 people found this helpful
Try putting single or double quotes around them ? or escaping them?
Have you tried protecting the characters with double qoutes or a forward slash?
The HELP to "install command" says:
Square brackets within an install command enclose optional information, such as [-a "??_INSTALL_ADMINFILE??"].
But i try to bypass this ... I have i tried with qoutes, double qoutes and forward slash and back slash
but it didn't help
You have something inside the brackets though right? i would assume that would pass whatever is in the brackets but it may not pass the brackets themselves. not really sure what we can do there.
we'll try to find a workarount WITHOUT using square brackets
Normally I would never reply to such an old post but I have been researching the same problem. I have an install command that must only be executed based upon some criteria on the target. Before getting into excessively complicated "bladelogic ways" of doing it, I just wanted something simple in the install command.
I wanted to perform and if [ "something" -eq "something" ]..... test for the installation but cannot use square brackets. After searching and banging my head I had a work-around hit me....use a 'case' statement! The beauty is you can have more than just success/failure with this method. You could evaluate any number of outputs from your test statement such as success, failure, captured output, etc.
Perform some test (i.e. grep localhost /etc/hosts)
case "$RETURN_VAL" in
0) Do something since test was successful
*) Any other value is a failure. Send some message, set exit code, whatever you need to do