May 2000
Beginner
761 pages
18h 20m
English
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 ...
Read now
Unlock full access