sed has rocked my world. sed (stream editor) isn’t an interactive text editor. Instead, it is used to filter text, i.e., it takes text input, performs some operation (or set of operations) on it, and outputs the modified text. sed is typically used for extracting part of a file using pattern matching or substituting multiple occurrences of a string within a file. Contents Basic Syntax How sed works Substitution Append, Insert and Delete Multiple expressions Remote with ssh Substitution grouping Numerical grouping Executing Commands sed with Vim Commands Basic syntax sed ' [RANGE] COMMANDS ' [INPUTFILE] If no INPUTFILE is specified, sed filters the contents of standard input.