sed

Stream editor for filtering and transforming text.

Installation

Usage

sed -e 's/<regex>/<replcm>/'   : Replace <regex> with <replcm>
sed -e 's|<regex>|<replcm>|'   : To use if there is a `/` in the text to replace
sed -ne 's/<regex>/<replcm>/p' : Don't print text if <regex> doesn't match
sed -e 's/\(<regex>\)/\1/'     : Replace <regex> with captured group `\1`
`+` must be escaped => [0-9]\+