calling curl inside .sh file
I have setenv.sh file used by tomcat, I can set java otpions in this sh file.
I want to use curl to get a value capture it in a variable and use it as a java opts its not working , please help me .Here is my script Code:
#!/bin/sh Please advice me whats wrong. |
try to replace
Code:
PUBLIC_DNS=curl http://169.254.169.254/latest/meta-data/public-hostname Code:
PUBLIC_DNS='curl http://169.254.169.254/latest/meta-data/public-hostname' |
Quote:
The correct forms are Code:
PUBLIC_DNS=`curl http://169.254.169.254/latest/meta-data/public-hostname` |
All times are GMT -5. The time now is 03:59 PM. |