Do not dot terminate errx() strings. Add rcsid.
Document -d flag. Rework SYNOPSIS section
This commit is contained in:
parent
2533e89e3b
commit
6ec34d218a
@ -40,10 +40,10 @@
|
||||
.Nd apply a command to a set of arguments
|
||||
.Sh SYNOPSIS
|
||||
.Nm apply
|
||||
.Op Fl a Ns Ar c
|
||||
.Op Fl Ns Ar #
|
||||
.Ar command argument
|
||||
.Op Ar ...
|
||||
.Op Fl a Ar c
|
||||
.Op Fl d
|
||||
.Op Fl #
|
||||
.Ar command argument ...
|
||||
.Sh DESCRIPTION
|
||||
.Nm apply
|
||||
runs the named
|
||||
@ -68,8 +68,8 @@ each execution of
|
||||
.Ar command .
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width "-ac"
|
||||
.It Fl Ns Ar #
|
||||
.Bl -tag -width indent
|
||||
.It Fl #
|
||||
Normally arguments are taken singly; the optional number
|
||||
.Fl #
|
||||
specifies the number of arguments to be passed to
|
||||
@ -86,16 +86,19 @@ occur in
|
||||
the
|
||||
.Fl #
|
||||
option is ignored.
|
||||
.It Fl a Ns Ar c
|
||||
.It Fl a Ar c
|
||||
The use of the character
|
||||
.Sq Li %
|
||||
as a magic character may be changed with the
|
||||
.Fl a
|
||||
option.
|
||||
.It Fl d
|
||||
Display the commands that would have been executed, but do not actually
|
||||
execute them.
|
||||
.El
|
||||
.Sh ENVIRONMENT
|
||||
The following environment variable affects the execution of
|
||||
.Nm apply :
|
||||
.Nm Ns :
|
||||
.Bl -tag -width SHELL
|
||||
.It Ev SHELL
|
||||
Pathname of shell to use.
|
||||
|
@ -72,7 +72,7 @@ main(argc, argv)
|
||||
case 'a':
|
||||
if (optarg[1] != '\0')
|
||||
errx(1,
|
||||
"illegal magic character specification.");
|
||||
"illegal magic character specification");
|
||||
magic = optarg[0];
|
||||
break;
|
||||
case 'd':
|
||||
@ -82,7 +82,7 @@ main(argc, argv)
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
if (nargs != -1)
|
||||
errx(1,
|
||||
"only one -# argument may be specified.");
|
||||
"only one -# argument may be specified");
|
||||
nargs = optopt - '0';
|
||||
break;
|
||||
default:
|
||||
@ -232,6 +232,6 @@ usage()
|
||||
{
|
||||
|
||||
(void)fprintf(stderr,
|
||||
"usage: apply [-a magic] [-0123456789] command arguments ...\n");
|
||||
"usage: apply [-a magic] [-d] [-0123456789] command arguments ...\n");
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user