diff options
author | roberto <roberto@FreeBSD.org> | 1999-03-10 17:22:12 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 1999-03-10 17:22:12 +0000 |
commit | c346790f67fead19172ab7bb3c8de293882079a3 (patch) | |
tree | bc004ef6da7e466cc3f93ee3a6e22b93bcee0621 /usr.bin/time/time.1 | |
parent | 6559ff40470c06ff38dedb173bbc3b2a7233a294 (diff) | |
download | FreeBSD-src-c346790f67fead19172ab7bb3c8de293882079a3.zip FreeBSD-src-c346790f67fead19172ab7bb3c8de293882079a3.tar.gz |
Adds the '-p' option to make time(1) output POSIX.2 compliant.
Updates the manpage as well.
I've rewritten the patch as it was for 2.2.7. It can probably be put
into 3.1-STABLE as well.
PR: bin/10515
Submitted by: Jens Schweikhardt <schweikh@noc.dfn.de>
Diffstat (limited to 'usr.bin/time/time.1')
-rw-r--r-- | usr.bin/time/time.1 | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/usr.bin/time/time.1 b/usr.bin/time/time.1 index f0fd00a..0d51613 100644 --- a/usr.bin/time/time.1 +++ b/usr.bin/time/time.1 @@ -39,7 +39,7 @@ .Nd time command execution .Sh SYNOPSIS .Nm -.Op Fl al +.Op Fl alp .Op Fl o Ar file .Ar command .Sh DESCRIPTION @@ -60,10 +60,9 @@ finishes, writes to the standard error stream, (in seconds): the total time elapsed, -time consumed by system overhead, -and the time used to execute the +the time used to execute the .Ar command -process. +process and the time consumed by system overhead. .Pp Available options: .Bl -tag -width Ds @@ -84,22 +83,44 @@ instead of stderr. If exists and the .Fl a flag is not specified, the file will be overwritten. +.It Fl p +Makes +.Nm +output POSIX.2 compliant (each time is printed on its own line). .El .Pp -The -.Xr csh 1 -has its own and syntactically different builtin version of +Most shells (including +.Xr csh 1 ) +have their own and syntactically different builtin version of .Nm time . The command described here is available as .Pa /usr/bin/time -to -.Xr csh -users. +to users of those shells. +.Sh DIAGNOSTICS +If +.Ar command +could be timed successfully, its exit status is returned. In case +.Ar command +terminated abnormally, a warning message is output to stderr. +If the +.Ar command +was found but could not be run, the exit status is 126. +If no +.Ar command +could be found at all, the exit status is 127. +If +.Nm +encounters any other error, the exit status is between 1 and 125 +included. .Sh SEE ALSO .Xr csh 1 , .Xr getrusage 2 , .Xr wait 2 +.Sh STANDARDS +The +.Nm +utility is expected to conform to ISO/IEC 9945-2:1993 (``POSIX''). .Sh HISTORY A .Nm |