Sed: Stream Editor Basics
AS
Aman Saurav
10 min read
#regex
#editing
Sed performs basic text transformations on an input stream (a file or input from a pipeline).
Substitution
The most common use case is find and replace.
sed 's/old-text/new-text/' file.txt
The above only replaces the first occurrence per line. Add
gat the end for global replacement:s/old/new/g.