sed is a useful command-line program with a horrible syntax. It is a stream editor. This means it operates on text flowing through it. Words are poured into one end, sed does its thing and the edited text spills out the other. It’s most useful inside shell scripts when text needs to be changed, but there’s no file to open. The stream of text can be from the output of other programs.