This one time, at band camp, Jeff Waugh wrote:
>So,
>
>Here's some silly shell...
>
>  $ grep bogomips /proc/cpuinfo | awk '{ print "+" $3 }' | tr -d '\n' | cut -c 2- | bc
>  6121.06
>
>Your mission: To work out what it's doing, why you'd be stupid enough to
>want to do it, and then how to do it better. It has to be in shell, and it
>has to handle decimals! :-)

echo $(($(grep bogomips /proc/cpuinfo|cut -f2 -d:|sed 's/$/ +/') 0))

grep bogomips /proc/cpuinfo|sed -e's/^.*://' -e's/^/+ /'| xargs echo 0|bc

-- 
[EMAIL PROTECTED]                           http://spacepants.org/jaq.gpg
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to