Core iTOps Tube

Wednesday, 9 May 2012

make file script not working

Hi All,

I have one requirement in my automation .

I need to pass values like 1 , 2 , 3 to MY_IMAGE in command line in linux .

I had defines activities for all these inputs in other make file.

The code similar to below i wrote for my requirement. Issue was whenever i passes values like MY_IMAGE=1 , MY_IMAGE=2 ,MY_IMAGE=3 it's printing only echo ACT_DO=XYZ;

It's not displaying the other info whenever i selected 2 or 3 .can any one check and correct my code .thanks in advance.


export MY_IMAGE


  if [ $img_value :="1" ]


    echo ACT_DO=XYZ;


  if [ $img_value :="2 ]


    echo ACT_DO=ABC;


  if [ $img_value :=3 ]


    echo ACT_DO=ETC;


    echo ""$img_value" is unsupported";

    exit 1;




---------- Post updated 05-09-12 at 12:08 AM ---------- Previous update was 05-08-12 at 10:53 PM ----------

can any one pls help in shell syntax if possible for the above mentioned requirement

Moderator's Comments:

code tags for code, please.

No comments:

Post a Comment