sed -i 's/root/1234/g' filename
sed '/exit 0/i 123' filename
sed '/exit 0/a 123' filename
sed -n '2,4p' filename
sed '2,3d' filename