sed [-n] [-V] [--quiet] [--silent] [--version] [--help] [-e script] [--expresion=script] [-f script-file] [--file=script-file] [script-if-no-other-script] [file…]
sed copies the named filename (standard input default) to the standard output, edited according to a script of command. Does not change the original file. (Read about sed in Chapter 4.) sed 's ability to filter text in a pipeline distinguishes it from other editors.
1 sed 's/Elizabeth/Lizzy/g' file 2 sed '/Dork/d' file 3 sed -n '15,20p' file |
Explanation
Substitutes all occurrences of Elizabeth with Lizzy in file and displays on the terminal screen.
Removes all lines containing Dork and prints the remaining lines on the screen.
Prints only lines 15 through 20.
3.15.18.198