summaryrefslogtreecommitdiffstats
path: root/usr.bin/apply
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1999-12-05 19:53:37 +0000
committercharnier <charnier@FreeBSD.org>1999-12-05 19:53:37 +0000
commit8b03354e3023710aa24c33cc8203969bc0d9de54 (patch)
treea8fc1ef493cc244bcab479c50423784a878c01b7 /usr.bin/apply
parent559cff8635aa15d29da3d6f87077806bb33feeae (diff)
downloadFreeBSD-src-8b03354e3023710aa24c33cc8203969bc0d9de54.zip
FreeBSD-src-8b03354e3023710aa24c33cc8203969bc0d9de54.tar.gz
Do not dot terminate errx() strings. Add rcsid.
Document -d flag. Rework SYNOPSIS section
Diffstat (limited to 'usr.bin/apply')
-rw-r--r--usr.bin/apply/apply.119
-rw-r--r--usr.bin/apply/apply.c6
2 files changed, 14 insertions, 11 deletions
diff --git a/usr.bin/apply/apply.1 b/usr.bin/apply/apply.1
index 4631cdb..39b827e 100644
--- a/usr.bin/apply/apply.1
+++ b/usr.bin/apply/apply.1
@@ -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.
diff --git a/usr.bin/apply/apply.c b/usr.bin/apply/apply.c
index dfb738a..fe060a0 100644
--- a/usr.bin/apply/apply.c
+++ b/usr.bin/apply/apply.c
@@ -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);
}
OpenPOWER on IntegriCloud