-.\" $NetBSD: apply.1,v 1.7 1998/04/28 04:07:08 fair Exp $
-.\"
.\" Copyright (c) 1983, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" SUCH DAMAGE.
.\"
.\" @(#)apply.1 8.2 (Berkeley) 4/4/94
+.\" $FreeBSD: src/usr.bin/apply/apply.1,v 1.14 2002/04/19 23:16:06 charnier Exp $
.\"
.Dd April 4, 1994
.Dt APPLY 1
-.Os BSD 4.2
+.Os
.Sh NAME
.Nm apply
.Nd apply a command to a set of arguments
.Sh SYNOPSIS
.Nm
-.Op Fl a Ns Ar c
-.Op Fl Ns Ar #
+.Op Fl a Ar c
+.Op Fl d
+.Op Fl #
.Ar command argument ...
.Sh DESCRIPTION
+The
.Nm
-runs the named
+utility runs the named
.Ar command
on each
argument
in
.Ar command ,
where
-.Dq Li d
+.Sq Li d
is a digit from 1 to 9, are replaced by the
.Li d Ns \'th
following unused
.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
.Pp
If any sequences of
.Dq Li \&%d
-occur in command, the
+occur in
+.Ar command ,
+the
.Fl #
option is ignored.
-.It Fl a Ns Ar c
+.It Fl a Ar c
The use of the character
-.Dq Li %
+.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 VARIABLES
+.Sh ENVIRONMENT
The following environment variable affects the execution of
-.Nm
-:
+.Nm :
.Bl -tag -width SHELL
.It Ev SHELL
Pathname of shell to use.
links all files in the current directory to the directory
.Pa /usr/joe .
.El
-.Sh Files
+.Sh FILES
.Bl -tag -width /bin/sh -compact
.It Pa /bin/sh
-Default shell
+default shell
.El
-.Sh AUTHOR
-Rob Pike
+.Sh AUTHORS
+.An Rob Pike
.Sh BUGS
Shell metacharacters in
.Ar command
.Sh HISTORY
The
.Nm
-command appeared in
+command appeared in
.Bx 4.2 .