In-place edit with backup sed

Edit in-place and save original as file.txt.bak

sed -i.bak 's/old/new/g' file.txt