My notepad

Chris' IT notes…
← Back

sed - comment out lines matching with

sh
sed -e '/MatchThisString/ s/^/#/' -i file

This will add a # in front of all the lines that are matching the string MatchThisString