outout format of time command
Robert Nichols
rnicholsNOSPAM at comcast.net
Tue Feb 1 16:05:32 UTC 2011
On 02/01/2011 04:27 AM, Rick Sewill wrote:
> On Tuesday, February 01, 2011 04:13:20 am Adel ESSAFI wrote:
>> Hello,
>> I have followed the man page of time commande to put a certain output
>> format.
>> However, time command does not recognise -f option.
>>
>> Could you help please.
>>
>>
>>
>> [adel at localhost generateInstance]$ time -f "%e" ls
>> bash: -f: command not found
>
> There are two separate time commands.
>
> One is a bash built-in.
> To set the format for this time, please set the environment variable,
> TIMEFORMAT. Please do "info bash" and search for TIMEFORMAT.
>
> The other is the time command described by "man time".
> To use this time command, please do $(which time) -f "%e" ls
> On my system, $(which time) happens to be /usr/bin/time
> so I can also do /usr/bin/time -f "%e" ls
Quoting a command, even quoting must one character of the command
name, will bypass the shell's builtin version:
$ \time -f %e sleep 2
2.00
$
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.
More information about the users
mailing list