why the !*@%!!# doesn't this work??
Posted in 1999
Topics: General Discussion
HI Boys & Girls! I'm trying to time some queries in shell scripts, I'd like to get the output of the time commands into a file, the results of the query to /dev/null. I've tried a variety of permutations and can't seem to get the time results into a file. One incarnation goes like: time 'bench.sh > /dev/null' 2> bench.out Can anybody shed some light in this darkened corner of my mind??? Thanks, Kevin PS I tried sending this through mail to informix-list@iiug.org instead of posting to the newsgroup and that didn't seem to work, even though I thought I had done this in the past. Is this the right address?
In article <7rtjfb$djl$1@ffx2nh3.news.uu.net>,
"Kevin" <kevin_burdish@timeinc.com> wrote:
> HI Boys & Girls!
Hi dear
> I'm trying to time some queries in shell scripts, I'd like to get the
output
> of the time commands into a file, the results of the query to
/dev/null.
> I've tried a variety of permutations and can't seem to get the time
results
> into a file. One incarnation goes like:
>
> time 'bench.sh > /dev/null' 2> bench.out
>
> Can anybody shed some light in this darkened corner of my mind???
I hope you're using dbaccess/isql for your benchmark script.
The problem is that dbaccess uses standard error output for
its additional information which doesn't related with sql and
'time' does its output to stderr too.
You can try to use follow command
time bench.sh 2>&1 |grep -e real -e sys -e user > bench.out
Regards,
Eugene Nechayev
> I had done this in the past. Is this the right address?
How to say mainly it's shell issue. ;-))
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.