dimanche 11 janvier 2015

How to use variables inside single quotes


I have an application which takes as an input attributes in double quotes embedded in single quotes. Take for example this right command:



command -p 'cluster="cl1"'


In order to automate it, I created a bash file using $CLUSTER as a variable. How should be my command? In other words, what should I put instead of cl1?


Please note that, If I modified the above command, it won't be accepted. For instance: command -p "cluster=cl1" is not accepted



Aucun commentaire:

Enregistrer un commentaire