summaryrefslogtreecommitdiffstats
path: root/bin/sh/sh.1
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2005-12-04 18:44:21 +0000
committerstefanf <stefanf@FreeBSD.org>2005-12-04 18:44:21 +0000
commit5c1966823e42873a2101b2690142669884e27d4b (patch)
tree2a17fd66522f5f32763b7ad240adeb0c635b360e /bin/sh/sh.1
parent097d1b86b3a4c615f8b2519a13fcbf9a625cff4e (diff)
downloadFreeBSD-src-5c1966823e42873a2101b2690142669884e27d4b.zip
FreeBSD-src-5c1966823e42873a2101b2690142669884e27d4b.tar.gz
Add the times builtin. It reports the user and system time for the shell
itself and its children. Instead of calling times() (as implied by POSIX) this implementation directly calls getrusage() to get the times because this is more convenient.
Diffstat (limited to 'bin/sh/sh.1')
-rw-r--r--bin/sh/sh.17
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index 6fe7795..ff0cf81 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -32,7 +32,7 @@
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $FreeBSD$
.\"
-.Dd October 29, 2005
+.Dd December 4, 2005
.Dt SH 1
.Os
.Sh NAME
@@ -1952,6 +1952,11 @@ A shift sets the value of $1 to the value of $2,
the value of $2 to the value of $3, and so on,
decreasing the value of $# by one.
If there are zero positional parameters, shifting does not do anything.
+.It Ic times
+Print the amount of time spent executing the shell and its children.
+The first output line shows the user and system times for the shell
+itself, the second one contains the user and system times for the
+children.
.It Ic trap Oo Ar action Oc Ar signal ...
Cause the shell to parse and execute
.Ar action
OpenPOWER on IntegriCloud