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



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to