If you want the output of time redirected to another file, be sure to use the actual GNU time command. Since Bash 2.0 time is a reserved shell keyword, having a slightly different behaviour in respect of the time command. You can verify this by
Code:
$ type time
time is a shell keyword
To actually use the GNU time (if installed on your system) you have to specify its full path. Then you can use its options to format the output and to redirect it to a file, for example:
Code:
/usr/bin/time -p -o time.log athena.py jobOptions.pythia.py 2>&1 | tee athena_gen.out
The -p option gives the portable output format, that is the same as that from the shell keyword.