From nobody@www.freebsd.org  Fri Jun  7 08:15:47 2002
Return-Path: <nobody@www.freebsd.org>
Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by hub.freebsd.org (Postfix) with ESMTP id 69F5E37B40D
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  7 Jun 2002 08:15:40 -0700 (PDT)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g57FFdhG014396
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 7 Jun 2002 08:15:39 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.2/8.12.2/Submit) id g57FFdDC014395;
	Fri, 7 Jun 2002 08:15:39 -0700 (PDT)
Message-Id: <200206071515.g57FFdDC014395@www.freebsd.org>
Date: Fri, 7 Jun 2002 08:15:39 -0700 (PDT)
From: Chris Pepper <pepper@rockefeller.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: time doesn't recognize its command-line options
X-Send-Pr-Version: www-1.0

>Number:         38985
>Category:       docs
>Synopsis:       time doesn't recognize its command-line options
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    keramida
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 07 08:20:02 PDT 2002
>Closed-Date:    Fri Jun 07 17:17:12 PDT 2002
>Last-Modified:  Fri Jun  7 17:20:01 PDT 2002
>Originator:     Chris Pepper
>Release:        4.6RC
>Organization:
>Environment:
FreeBSD guest.reppep.com 4.6-RC FreeBSD 4.6-RC #0: Fri May 31 22:33:23 EDT 2002     root@guest.reppep.com:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
time's man page says it provides various flags, including -h (human-readable) and -p (POSIX-style), but these flags generate errors when used.

guest# man time
TIME(1)                 FreeBSD General Commands Manual                TIME(1)

NAME
     time - time command execution

SYNOPSIS
     time [-al] [-h | -p] [-o file] command

DESCRIPTION
     The time utility executes and times command by initiating a timer and
     passing the command to the shell.  After the command finishes, time
     writes to the standard error stream, (in seconds): the total time
     elapsed, the time used to execute the command process and the time con-
     sumed by system overhead.

     Available options:

     -a      If the -o flag is used, append to the specified file rather than
             overwriting it.  Otherwise, this option has no effect.

     -h      Print times in a human friendly format.  Times are printed in
             minutes, hours, etc. as appropiate.

     -l      The contents of the rusage structure are printed as well.

     -o file

>How-To-Repeat:
guest# time -h ls
-h: Command not found.
0.000u 0.000s 0:00.00 0.0%      0+0k 0+0io 0pf+0w
guest# time -p ls
-p: Command not found.
0.000u 0.000s 0:00.00 0.0%      0+0k 0+0io 0pf+0w
guest# time -l ls
-l: Command not found.
0.000u 0.000s 0:00.00 0.0%      0+0k 0+0io 0pf+0w

>Fix:
      
>Release-Note:
>Audit-Trail:

From: Tom Rhodes <darklogik@pittgoth.com>
To: Chris Pepper <pepper@rockefeller.edu>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: docs/38985: time doesn't recognize its command-line options
Date: Fri, 07 Jun 2002 16:59:21 -0400

 Chris Pepper wrote:
 
 >>Number:         38985
 >>Category:       docs
 >>Synopsis:       time doesn't recognize its command-line options
 >>Confidential:   no
 >>Severity:       non-critical
 >>Priority:       medium
 >>Responsible:    freebsd-doc
 >>State:          open
 >>Quarter:        
 >>Keywords:       
 >>Date-Required:
 >>Class:          doc-bug
 >>Submitter-Id:   current-users
 >>Arrival-Date:   Fri Jun 07 08:20:02 PDT 2002
 >>Closed-Date:
 >>Last-Modified:
 >>Originator:     Chris Pepper
 >>Release:        4.6RC
 >>Organization:
 >>Environment:
 >>
 > FreeBSD guest.reppep.com 4.6-RC FreeBSD 4.6-RC #0: Fri May 31 22:33:23 EDT 2002     root@guest.reppep.com:/usr/obj/usr/src/sys/GENERIC  i386
 > 
 > 
 >>Description:
 >>
 > time's man page says it provides various flags, including -h (human-readable) and -p (POSIX-style), but these flags generate errors when used.
 > 
 > guest# man time
 > TIME(1)                 FreeBSD General Commands Manual                TIME(1)
 > 
 > NAME
 >      time - time command execution
 > 
 > SYNOPSIS
 >      time [-al] [-h | -p] [-o file] command
 > 
 > DESCRIPTION
 >      The time utility executes and times command by initiating a timer and
 >      passing the command to the shell.  After the command finishes, time
 >      writes to the standard error stream, (in seconds): the total time
 >      elapsed, the time used to execute the command process and the time con-
 >      sumed by system overhead.
 > 
 >      Available options:
 > 
 >      -a      If the -o flag is used, append to the specified file rather than
 >              overwriting it.  Otherwise, this option has no effect.
 > 
 >      -h      Print times in a human friendly format.  Times are printed in
 >              minutes, hours, etc. as appropiate.
 > 
 >      -l      The contents of the rusage structure are printed as well.
 > 
 >      -o file
 > 
 > 
 >>How-To-Repeat:
 >>
 > guest# time -h ls
 > -h: Command not found.
 > 0.000u 0.000s 0:00.00 0.0%      0+0k 0+0io 0pf+0w
 > guest# time -p ls
 > -p: Command not found.
 > 0.000u 0.000s 0:00.00 0.0%      0+0k 0+0io 0pf+0w
 > guest# time -l ls
 > -l: Command not found.
 > 0.000u 0.000s 0:00.00 0.0%      0+0k 0+0io 0pf+0w
 > 
 > 
 
 
 echo $SHELL
 man 1 builtin
 
 
 
 -- 
 Tom (Darklogik) Rhodes
 www.Pittgoth.com Gothic Discussion Forum
 www.FreeBSD.org  The Power To Serve
 trhodes@{Pittgoth.com, FreeBSD.org}
 
State-Changed-From-To: open->closed 
State-Changed-By: keramida 
State-Changed-When: Fri Jun 7 17:14:15 PDT 2002 
State-Changed-Why:  
There's nothing really wrong with time(1).  It describes /usr/bin/time 
which is different from Bourne shell's `time' builtin.  Nevertheless, 
thankie for trying to help with making FreeBSD a better OS than it 
already is for all of us ;) 


Responsible-Changed-From-To: freebsd-doc->keramida 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Fri Jun 7 17:14:15 PDT 2002 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=38985 

From: Giorgos Keramidas <keramida@FreeBSD.org>
To: Ross Lippert <ripper@eskimo.com>
Cc: bradyn@maths.tcd.ie, pepper@rockefeller.edu,
	bug-followup@FreeBSD.org
Subject: Re: docs/38985: time doesn't recognize its command-line options
Date: Sat, 8 Jun 2002 03:13:07 +0300

 On 2002-06-07 09:16 -0700, Ross Lippert wrote:
 >
 > >Sounds like you're using the shell built-in version of time...
 > >try doing
 > >        which time
 > >to see which one you're using.  /usr/bin/time supports the flags
 > >you mentioned!
 >
 > HAHA!! not so fast there buddy.
 >
 > bash-2.05a$ which time
 > /usr/bin/time
 > bash-2.05a$ time date
 > Fri Jun  7 12:11:08 EDT 2002
 >
 > real    0m0.003s
 > user    0m0.000s
 > sys     0m0.001s
 > bash-2.05a$ /usr/bin/time date
 > Fri Jun  7 12:11:12 EDT 2002
 >         0.00 real         0.00 user         0.00 sys
 
 The bash shell doesn't have a "which" builtin.  Try "type":
 
 	03:10:55 [charon@labs ~]$ type which
 	which is /usr/bin/which
 
 	03:10:57 [charon@labs ~]$ echo $SHELL
 	/bin/bash
 
 	03:11:00 [charon@labs ~]$ which time
 	/usr/bin/time
 
 	03:11:03 [charon@labs ~]$ type time
 	time is a shell keyword
 
 - Giorgos
 
>Unformatted:
