Subject: | |
From: | |
Reply To: | |
Date: | Wed, 29 Aug 2012 11:29:11 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
John,
I'm not sure if this will work, but have you tried adding quotes around the parens? Something like this:
/usr/bin/time "(cat file | ./foo)"
Tony
________________________________________
From: Research Computing Support [[log in to unmask]] On Behalf Of Karro, John E. Dr. [[log in to unmask]]
Sent: Wednesday, August 29, 2012 10:55 AM
To: [log in to unmask]
Subject: Linux question
Jens or Robin,
I'm running into the following Linux problem using the bash shell in redhawk.
I have a executable that I want to time, but it takes its input from stdio. So to run it I do:
cat file | ./foo
If in trying to time it I use:
time cat file | ./foo
I get the timing of cat, not of ./foo. I can fix this with:
time (cat file | ./foo)
This works. But I want to use gnu time. And if I do:
/usr/bin/time (cat file| ./foo)
I get an error. (And without the parens I get the runtime of cat again.)
Any idea how to make this work?
John
----------------------------------------------------------------------------
Dr. John Karro ([log in to unmask])
http://www.eas.muohio.edu/people/karroje
Associate Professor
Miami University, Computer Science & Software Engineering
Miami University, Microbiology (affiliate professor)
Miami University, Statistics (affiliate professor)
205A Benton Hall, Miami University, Oxford OH 45056
(513) 529-0357 (Work)
----------------------------------------------------------------------------
|
|
|