What is my ip from the command line?
curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
wget http://ipinfo.io/ip -qO -
Perl
None greedy find and replace
perl -pe 's|.*?find|replace_with|' file_name
Make a backup of the file to be changed
perl -i.bak -pe 's|.*?find|replace_with|' file_name