I am trying to get a dns address using curl and I would like to use that dsn address to replace a word in a .js file.
So the .js file contains a word "hostname" and I would like to replace that with the dns address fetched from curl so what I am trying to do is this.
sed 's/hostname/curl -s http://169.254.169.254/latest/meta-data/public-hostname/g' server.js
I get a error message which is sed: -e expression #1, char 26: unknown option to s'