#sed

Sed is a Stream Editor that can search, match, group and exchange strings from a stream of text. Sed works with options and flags, which we will look at more.

#Examplefile

In the examples that follow, a text file, courses.txt is used with the content:

Kenneth Lewenhagen is the teacher in the course VLinux (DV1611).
Andreas Arnesson is the teacher in the course OOPython (DV1437).
Emil Folino is the teacher in the course Webbapp (DV1609).
Mikael Roos is the teacher in the course OOPHP (DV1608).

We can use it together with redirection: sed command <courses.txt. If you want to test yourself, the file is located in the examplefolder.

#Revision history

  • 2019-08-20: (A, lew) First edition.

Document source.