How to Find and Replace Text in a File on the Command Line Using Sed

I am working on deploying a web app I created and in order to automate the deployment of that web application I have been having to pass bash scripts to the EC2 instance. These bash scripts completely configure the instance and download/setup everything it needs. One thing I wanted to do in these bash scripts is to have the server email me its public ip address at the end of the bash deployment script...

more ...