105 lines
2.8 KiB
HTML
105 lines
2.8 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<!-- This HTML file has been created by texi2html 1.54
|
|
from ../texi/sed.texi on 28 October 1999 -->
|
|
|
|
<TITLE>sed, a stream editor - Invocation</TITLE>
|
|
<link href="sed_3.html" rel=Next>
|
|
<link href="sed_1.html" rel=Previous>
|
|
<link href="sed_toc.html" rel=ToC>
|
|
|
|
</HEAD>
|
|
<BODY>
|
|
<p>Go to the <A HREF="sed_1.html">first</A>, <A HREF="sed_1.html">previous</A>, <A HREF="sed_3.html">next</A>, <A HREF="sed_9.html">last</A> section, <A HREF="sed_toc.html">table of contents</A>.
|
|
<P><HR><P>
|
|
|
|
|
|
<H1><A NAME="SEC2" HREF="sed_toc.html#TOC2">Invocation</A></H1>
|
|
|
|
<P>
|
|
SED may be invoked with the following command-line options:
|
|
|
|
</P>
|
|
<DL COMPACT>
|
|
|
|
<DT><SAMP>`-V'</SAMP>
|
|
<DD>
|
|
<DT><SAMP>`--version'</SAMP>
|
|
<DD>
|
|
<A NAME="IDX2"></A>
|
|
<A NAME="IDX3"></A>
|
|
<A NAME="IDX4"></A>
|
|
Print out the version of SED that is being run and a copyright notice,
|
|
then exit.
|
|
|
|
<DT><SAMP>`-h'</SAMP>
|
|
<DD>
|
|
<DT><SAMP>`--help'</SAMP>
|
|
<DD>
|
|
<A NAME="IDX5"></A>
|
|
<A NAME="IDX6"></A>
|
|
<A NAME="IDX7"></A>
|
|
Print a usage message briefly summarizing these command-line options
|
|
and the bug-reporting address,
|
|
then exit.
|
|
|
|
<DT><SAMP>`-n'</SAMP>
|
|
<DD>
|
|
<DT><SAMP>`--quiet'</SAMP>
|
|
<DD>
|
|
<DT><SAMP>`--silent'</SAMP>
|
|
<DD>
|
|
<A NAME="IDX8"></A>
|
|
<A NAME="IDX9"></A>
|
|
<A NAME="IDX10"></A>
|
|
By default, SED will print out the pattern space
|
|
at then end of each cycle through the script.
|
|
These options disable this automatic printing,
|
|
and SED will only produce output when explicitly told to
|
|
via the <CODE>p</CODE> command.
|
|
|
|
<DT><SAMP>`-e <VAR>script</VAR>'</SAMP>
|
|
<DD>
|
|
<DT><SAMP>`--expression=<VAR>script</VAR>'</SAMP>
|
|
<DD>
|
|
<A NAME="IDX11"></A>
|
|
<A NAME="IDX12"></A>
|
|
<A NAME="IDX13"></A>
|
|
Add the commands in <VAR>script</VAR> to the set of commands to be
|
|
run while processing the input.
|
|
|
|
<DT><SAMP>`-f <VAR>script-file</VAR>'</SAMP>
|
|
<DD>
|
|
<DT><SAMP>`--file=<VAR>script-file</VAR>'</SAMP>
|
|
<DD>
|
|
<A NAME="IDX14"></A>
|
|
<A NAME="IDX15"></A>
|
|
<A NAME="IDX16"></A>
|
|
Add the commands contained in the file <VAR>script-file</VAR>
|
|
to the set of commands to be run while processing the input.
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
If no <CODE>-e</CODE>, <CODE>-f</CODE>, <CODE>--expression</CODE>, or <CODE>--file</CODE>
|
|
options are given on the command-line,
|
|
then the first non-option argument on the command line is
|
|
taken to be the <VAR>script</VAR> to be executed.
|
|
|
|
</P>
|
|
<P>
|
|
<A NAME="IDX17"></A>
|
|
If any command-line parameters remain after processing the above,
|
|
these parameters are interpreted as the names of input files to
|
|
be processed.
|
|
<A NAME="IDX18"></A>
|
|
A file name of <CODE>-</CODE> refers to the standard input stream.
|
|
The standard input will processed if no file names are specified.
|
|
|
|
</P>
|
|
|
|
<P><HR><P>
|
|
<p>Go to the <A HREF="sed_1.html">first</A>, <A HREF="sed_1.html">previous</A>, <A HREF="sed_3.html">next</A>, <A HREF="sed_9.html">last</A> section, <A HREF="sed_toc.html">table of contents</A>.
|
|
</BODY>
|
|
</HTML>
|