/usr/bin/time script

Kelledin kelledin+LFS at skarpsey.dyndns.org
Fri Mar 14 10:48:09 PST 2003

This is similar to the "which" issue we hit a while back, except 
that the "time" command _is_ available...as a bash keyword.  
This would normally be enough, but the keyword's behavior 
differs from what some apps expect:

1) LADSPA expects "time" to be available as an executable utility 
in the system PATH.  Just a bash keyword isn't enough; LADSPA 
emits a "make: time: Command not found" error during build and 
promptly punts.

2) Some MySQL test/benchmark scripts try to gather the output of 
the time command.  Using "time" as a bash keyword is a problem, 
because unless "time" gets executed in a shell all its own, 
simply grabbing stdout or stderr doesn't seem to pick up the 

The simplest way I know to take care of this is to use a bash 
wrapper script, attached below.  Probably fitting to put this in 
BLFS with the "which" instructions...

"If a server crashes in a server farm and no one pings it, does 
it still cost four figures to fix?"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: time.sh
Type: application/x-shellscript
Size: 637 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20030314/907db142/attachment.bin>

More information about the lfs-dev mailing list