Your message dated Sun, 18 Mar 2012 19:34:58 +0000
with message-id <[email protected]>
and subject line Re: Bug#663421: debianutils: 'which time' reports
'/usr/bin/time', rather than Bash reserved word
has caused the Debian Bug report #663421,
regarding debianutils: 'which time' reports '/usr/bin/time', rather than Bash
reserved word
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
663421: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=663421
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: debianutils
Version: 3.4
Severity: normal
'time' is a program that the 'which' program can find:
$ which time
/usr/bin/time
But, 'time' is also a Bash reserved word:
$ man bash | grep 'time reserved word'
If the time reserved word precedes a pipeline, the elapsed as
well as
If the user does not know about the Bash 'time' reserved word, confusion
results:
$ time echo 'foo'
foo
real 0m0.000s
user 0m0.000s
sys 0m0.000s
$ man time | grep . | head
TIME(1) TIME(1)
NAME
time - run programs and summarize system resource usage
SYNOPSIS
time [ -apqvV ] [ -f FORMAT ] [ -o FILE ]
[ --append ] [ --verbose ] [ --quiet ] [ --portability ]
[ --format=FORMAT ] [ --output=FILE ] [ --version ]
[ --help ] COMMAND [ ARGS ]
DESCRIPTION
time run the program COMMAND with any given arguments
ARG.... When
$ time -o foo.out echo 'foo'
-bash: -o: command not found
real 0m0.001s
user 0m0.004s
sys 0m0.000s
$ time --help
-bash: --help: command not found
real 0m0.001s
user 0m0.000s
sys 0m0.000s
It appears that 'time' is broken. It would be better if 'which'
reported that 'time' is provided by Bash, similar to Bash's 'type' shell
builtin command:
$ type which
which is hashed (/usr/bin/which)
$ type type
type is a shell builtin
-- System Information:
Debian Release: 6.0.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages debianutils depends on:
ii libc6 2.11.3-3 Embedded GNU C Library:
Shared lib
ii sensible-utils 0.0.4 Utilities for sensible
alternative
debianutils recommends no packages.
debianutils suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Sun, Mar 18, 2012 at 12:25:41PM -0700, David Christensen wrote:
> "/usr/bin/which" should be "/usr/bin/time".
I'm closing this bug. Feel free to reopen if you have a concrete
suggestion about how /usr/bin/which should behave differently.
Otherwise I suggest that it not be used by humans unless they
wish to recreate what would happen in a maintainer script.
--- End Message ---