Search This Blog

sed: delimiters for substitute strings

/ | % can be used as delimiters:
sed -i .bak -e 's/old/new/g' 1.txt
sed -i .bak -e 's%old%new%g' 2.txt
sed -i .bak -e 's|http://old.org|http://new.org|g' 3.html

No comments:

Post a Comment