Sed - Stream Editor in Unix
Use a matched string in the replace section. The command below will save the matched string between HETATM and NVP as \1. We can then print the matched string between "ATOM " and NVR.
sed 's/HETATM\(.*\)NVP/ATOM \1NVR/' nvp.pdb
Remove first line of a file
sed '1d' filename > newfile