see also
match ip address
ip a show dev wlp3s0 | grep "inet " | sed 's/....inet.\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/'
sed -e "s/.*inet.(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).*/
edit file inplace
sed 's/foo/bar/g' -i file.txt
I think this is a GNU extension. I believe the traditional way is to write to a temp file and then copy that file to replace the source.