sed -e 's/yourpattern/yourpatternXXXTTTXXX/g' -e 's/XXXTTTXXX/ /g' file ^add some unique pattern here