Shaves 10 Ms Off The Run Time Here ;)


Recommended Posts

just curious, what did you do to time it. Did you used something like this?

#!/bin/bash
TIME1=`date +%N`
find /etc | grep -i xorg
TIME2=`date +%N`
echo $(expr $TIME2 - $TIME1)

by the way. why can't I use variables with backticks. The following will not work

echo `expr $TIME2 - $TIME1`

Link to post
Share on other sites
just curious, what did you do to time it.

time builtin.

 $ time find /etc/ | grep -i xorg
[...]
real 0m0.063s
user 0m0.028s
sys 0m0.036s
$ time find /etc/ -iname '*xorg*'
[...]
real 0m0.060s
user 0m0.024s
sys 0m0.032s

by the way. why can't I use variables with backticks.

Dunno.

$ TIME1=`date +%N`
$ TIME2=`date +%N`
$ echo `expr $TIME2 - $TIME1`
-350997000

Edited by jcl
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...