Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 2002 18:09:40 +0300
From:      Peter Pentchev <roam@ringlet.net>
To:        Chris Pepper <pepper@reppep.com>
Cc:        Ross Lippert <ripper@eskimo.com>, bradyn@maths.tcd.ie, freebsd-docs@FreeBSD.ORG
Subject:   Re: docs/38985: time doesn't recognize its command-line options
Message-ID:  <20020610180940.C37176@straylight.oblivion.bg>
In-Reply-To: <p05111b12b926a8262509@[129.85.219.160]>; from pepper@reppep.com on Fri, Jun 07, 2002 at 02:19:20PM -0400
References:  <200206071616.JAA13829@eskimo.com> <p05111b12b926a8262509@[129.85.219.160]>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, Jun 07, 2002 at 02:19:20PM -0400, Chris Pepper wrote:
> At 9:16 AM -0700 2002/06/07, Ross Lippert wrote:
> >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
> >bash-2.05a$ which which
> >/usr/bin/which
> >bash-2.05a$ /usr/bin/which time
> >/usr/bin/time
> 
> Ross,
> 
> 	I think you're getting tripped up by bash. csh provides its 
> own 'smart' which command, which knows its own builtins. bash uses 
> the system which, which doesn't know about shell builtins. For bash, 
> use 'man builtin'.

Or, for bash, use the 'type' builtin:

[roam@straylight:p4 ~]$ echo $BASH_VERSION
2.05a.0(1)-release
[roam@straylight:p4 ~]$ which time
/usr/bin/time
[roam@straylight:p4 ~]$ type time
time is a shell keyword
[roam@straylight:p4 ~]$ type which
which is hashed (/usr/bin/which)
[roam@straylight:p4 ~]$ type /usr/bin/time
/usr/bin/time is /usr/bin/time
[roam@straylight:p4 ~]$

G'luck,
Peter

-- 
Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
This inert sentence is my body, but my soul is alive, dancing in the sparks of your brain.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020610180940.C37176>