Date: Fri, 7 Jun 2002 14:19:20 -0400 From: Chris Pepper <pepper@reppep.com> To: Ross Lippert <ripper@eskimo.com> Cc: bradyn@maths.tcd.ie, freebsd-docs@FreeBSD.ORG Subject: Re: docs/38985: time doesn't recognize its command-line options Message-ID: <p05111b12b926a8262509@[129.85.219.160]> In-Reply-To: <200206071616.JAA13829@eskimo.com> References: <200206071616.JAA13829@eskimo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
At 9:16 AM -0700 2002/06/07, 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! Aha. I now see a warning about csh providing time in the time man page. Should I write a pr to enhance csh's time built-in to be feature-complete (equivalent to the command it's overriding)? This seems appropriate to me, but not sure if there are rules for what csh builtins do and don't provide. >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'. >guest# which time >time: shell built-in command. >guest# which which >which: shell built-in command. >guest# echo $shell >/bin/csh Chris Pepper PS-For completeness, there's also whereis, which csh doesn't override. >I get burned by this too. What is the RIGHT way to: > >1) know if a particular function is being done by the shell or not >2) get a list of all commands the shell is doing for you which are also >are the names of exectuables in your current PATH. -- Chris Pepper: <http://www.reppep.com/~pepper/> Rockefeller University: <http://www.rockefeller.edu/> 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?p05111b12b926a8262509>