document supported options better, add a short info about

this awk on start of DESCRIPTION section
This commit is contained in:
jdolecek 2001-02-05 13:23:57 +00:00
parent 1af765a6dd
commit 1acb637946
1 changed files with 53 additions and 14 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: awk.1,v 1.3 2001/02/04 20:47:50 jdolecek Exp $
.\" $NetBSD: awk.1,v 1.4 2001/02/05 13:23:57 jdolecek Exp $
.\"
.\" Copyright (C) Lucent Technologies 1997
.\" All Rights Reserved
@ -32,17 +32,28 @@
.Nm
.Op Fl F Ar fs
.Op Fl v Ar var=value
.Op Ar prog | Fl f Ar progname
.Op Fl safe
.Op Fl d[N]
.Op Ar prog | Fl f Ar filename
.Ar
.Nm ""
.Fl V
.Sh DESCRIPTION
.Nm
is the Bell Labs' implementation of the AWK programming language as
described in the
.Em The AWK Programming Language
by
A. V. Aho, B. W. Kernighan, and P. J. Weinberger.
.Pp
.Nm
scans each input
.Ar file
for lines that match any of a set of patterns specified literally in
.Ar prog
or in one or more files
specified as
.Fl f Ar progfile .
.Fl f Ar filename .
With each pattern
there can be an associated action that will be performed
when a line of a
@ -60,20 +71,48 @@ of the form
.Ar var=value
is treated as an assignment, not a filename,
and is executed at the time it would have been opened if it were a filename.
The option
.Fl v
followed by
.Ar var=value
is an assignment to be done before
.Pp
The options are as follows:
.Bl -tag -width indent
.It Fl d[N]
Set debug level to specified number
.Ar N .
If the number is omitted, debug level is set to 1.
.It Fl f Ar filename
Read the AWK program source from specified file
.Ar filename ,
instead of the first command line argument.
Multiple
.Fl f
options may be specified.
.It Fl F Ar fs
Set the input field separator
.Va FS
to the regular expression
.Ar fs .
.It Fl mr Ar NNN , Fl mf Ar NNN
Obsolete, no longer needed options. Set limit on maximum record or
fields number.
.It Fl safe
Potentially unsafe functions such as
.Fn system
make the program abort (with a warning message).
.It Fl v
Assign the value
.Ar value
to the variable
.Va var
before
.Ar prog
is executed;
any number of
is executed.
Any number of
.Fl v
options may be present.
The
.Fl F Ar fs
option defines the input field separator to be the regular expression
.Ar fs.
.It Fl V
Print
.Nm
version on standard output and exit.
.El
.Pp
An input line is normally made up of fields separated by white space,
or by regular expression