Hello Everyone,
I am up and running in Amazons EC2, and I have installed and configured the ec2 scripting tools.
The following command extracts the Public DNS from the indicated running instance:
ec2-describe-instances i-XXXXXXXX |grep INSTANCE|cut -f4
Results:
ec2-XX-XX-XXX-XXX.compute-1.amazonaws.com
I would like to assign this result to a variable, however, all my attemps result in the following error regardless of how I use quotes:
PDNS=ec2-describe-instances i-XXXXXXXX |grep INSTANCE|cut -f4
Results:
i-XXXXXXXX: command not found
Is there a default $Variable that gets set with the results of the last command? If not, how can I set the results of the command mentioned above to a variable?
Thanks in advance!
Bookmarks