Appendix A. Quick Reference for sedA.1. Command-Line SyntaxThe syntax for invoking sed has two forms: sed [-n][-e] `command' file(s) sed [-n] -f scriptfile file(s) The first form allows you to specify an editing command on the command line, surrounded by single quotes. The second form allows you to specify a scriptfile, a file containing sed commands. Both forms may be used together, and they may be used multiple times. The resulting editing script is the concatenation of the commands and script files. The following options are recognized:
If the first line of the script is "#n", sed behaves as if -n had been specified. Frequently used sed scripts are usually invoked from a shell script. Since this is the same for sed or awk, see Section B.1.1 in Appendix B, "Quick Reference for awk". Copyright © 2003 O'Reilly & Associates. All rights reserved. |
|