shanenin Posted July 25, 2006 Report Share Posted July 25, 2006 just curious, what did you do to time it. Did you used something like this?#!/bin/bashTIME1=`date +%N`find /etc | grep -i xorgTIME2=`date +%N`echo $(expr $TIME2 - $TIME1)by the way. why can't I use variables with backticks. The following will not workecho `expr $TIME2 - $TIME1` Quote Link to post Share on other sites
jcl Posted July 26, 2006 Report Share Posted July 26, 2006 (edited) just curious, what did you do to time it.time builtin. $ time find /etc/ | grep -i xorg[...]real 0m0.063suser 0m0.028ssys 0m0.036s$ time find /etc/ -iname '*xorg*'[...]real 0m0.060suser 0m0.024ssys 0m0.032sby the way. why can't I use variables with backticks.Dunno.$ TIME1=`date +%N`$ TIME2=`date +%N`$ echo `expr $TIME2 - $TIME1`-350997000 Edited July 26, 2006 by jcl Quote Link to post Share on other sites
shanenin Posted July 26, 2006 Author Report Share Posted July 26, 2006 that 'time' command is cool. I am not sure why those backticks were failing. Now they are working fine(like they should). Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.