Do not dot terminate errx() strings. Add rcsid.

Document -d flag. Rework SYNOPSIS section
This commit is contained in:
Philippe Charnier 1999-12-05 19:53:37 +00:00
parent 2533e89e3b
commit 6ec34d218a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=54157
2 changed files with 14 additions and 11 deletions

View File

@ -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.

View File

@ -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);
}