Shaun Abram
Technology and Leadership Blog
sed
sed (stream editor) is an simple but incredibly versatile command line tool that parses and transforms text. It is line-oriented in that it reads the text line by line, transforms it, and outputs the result.
For example, this sed command would replace all occurrences of the text “white” with “black”:
sed s/white/black/g
sed reads text on a line by line basis and performs an operation on it, usually extracting or replacing text snippets. In this case, the s prefix means substitute, and the g suffix means global. Other example usages include: