help needed to understand sed command
by Nitimohan from LinuxQuestions.org on (#4VV7Y)
Hi all, I am trying to use following script and need help with understanding the SED command
Shell script is as follows:
Cat <<EOF > stratup.sh
#! /bin/bash
apt-get update
apt-get install -y nginx
service nginx start
sed -i --'s/nginx/Google Cloud Platform - '"\$HOSTNAME"'/' /var/www/html/index.nginx-debian.html
EOF
Please can someone tell me what the sed command is doing here.
Thanks,
Niti


Shell script is as follows:
Cat <<EOF > stratup.sh
#! /bin/bash
apt-get update
apt-get install -y nginx
service nginx start
sed -i --'s/nginx/Google Cloud Platform - '"\$HOSTNAME"'/' /var/www/html/index.nginx-debian.html
EOF
Please can someone tell me what the sed command is doing here.
Thanks,
Niti