-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [redirecting to bug-bash, as this is a bash-specific question]
According to Yu Cha Yung on 6/23/2008 12:24 AM: | Hi, | I am trying to export the output of time into a text file but failed =sing | the following command: | time ls > time.txt | It doesnt show the information of time in time.txt. That's because in bash, time is a reserved word, and because time's output goes to stderr, not stdout. You need a compound command, such as: { time ls; } >time.txt 2>&1 or avoid the bash reserved word to invoke /bin/time (assuming you have a replacement program installed): \time ls >time.txt 2>&1 | basically i try all the option for time and only -p option works. Do you have any ideas on this matter? Thx! That's because the bash reserved word time only supports -p (try 'help time' to see this). - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhfk3gACgkQ84KuGfSFAYC69QCfULlCIQM2wSqOsHaqBk7UFfpT zUMAn0PMCpluzJqO9SO7wVbzMjI5Drai =+z1I -----END PGP SIGNATURE-----