LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-21-2004, 06:47 AM   #1
anandj
Member
 
Registered: May 2004
Distribution: Fedora Core 4
Posts: 92

Rep: Reputation: 15
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
 
Old 06-12-2004, 08:32 PM   #2
meblost
Member
 
Registered: May 2004
Location: At Keyboard
Distribution: Mandrake 10.0, SuSE 9.0
Posts: 114

Rep: Reputation: 15
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...
 
Old 06-12-2004, 11:37 PM   #3
anandj
Member
 
Registered: May 2004
Distribution: Fedora Core 4
Posts: 92

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the command 'time'? buuchanh Linux - Newbie 3 10-13-2005 01:46 PM
time command krock923 Programming 11 07-09-2005 04:46 PM
Redirecting output of running command tommyr1216 Linux - General 3 03-04-2005 08:20 PM
Redirecting output to a command-line argument of another command madiyaan Linux - Newbie 1 02-19-2005 04:35 PM
time command twantrd Linux - General 3 12-08-2004 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration