From: "Jeff Waugh" <[EMAIL PROTECTED]>
> $ 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! :-)
Looks like it's grabbing the bogomips value (and adding a + in front of),
cutting the \n off it, removing the +, then passing it to bc to shove the \n
back in... Why you'd want to do it? no idea :)
better like this:
$ grep bogomips /proc/cpuinfo | sed 's/.*: \(.*\).*$/\1/'
1101.00
?
--
Damien Gardner Jnr
VK2TDG. Dip EE. StudIEAust
Home: [EMAIL PROTECTED] - http://www.rendrag.net/
Play: [EMAIL PROTECTED] - http://pinegap.net/
Work: [EMAIL PROTECTED] - http://www.isa.net.au/
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug