LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   redirecting out of 'time' command (https://www.linuxquestions.org/questions/linux-newbie-8/redirecting-out-of-time-command-184061/)

anandj 05-21-2004 06:47 AM

redirecting out of 'time' command
 
I am really embarrased to ask this simple question in the forum.. by right now I am stumped and I have no idea how accomplish what I want.

How do I redirect the output of the 'time' command?

Let us say I want to time a executable, on the sunos I used to type

time `a.out > output` >& timeout &

but in linux it saying 'ambiguous redirect'
How do I accomplish what I want?

BTW I am using tcsh

thanks for your help.
AJ

meblost 06-12-2004 08:32 PM

Do you have to use tcsh? With bash you can use the -o ( or --output= ) option to output to a given file.

time -o <output_file> <command>

Although this doesn't work with tcsh, not quite what you were looking for...

anandj 06-12-2004 11:37 PM

Thanks..
I realized if I force tcsh to use the /usr/bin/time instead of the built-in 'time' I could use the -o option.
-AJ


All times are GMT -5. The time now is 01:32 AM.