* bin/cpu-freq: performance improvement, simplify pipes

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-06-08 11:38:32 -05:00
commit aaa17142c0
2 changed files with 4 additions and 6 deletions

View file

@ -22,9 +22,6 @@ if [ "$1" = "--detail" ]; then
exit 0
fi
mhz=`egrep -i -m 1 "^cpu MHz|^clock|^bogomips" /proc/cpuinfo | awk -F"[:.]" '{print $2}'`
speed=`egrep -i -m 1 "^cpu MHz|^clock|^bogomips" /proc/cpuinfo | awk -F"[:.]" '{ printf "%.1f", $2 / 1000 }'`
speed=$(echo $mhz | awk '{ printf "%.1f", $1 / 1000 }')
unit="GHz"
[ -n "$speed" ] && printf "\005{= cW}%s$unit\005{-} " $speed
[ -n "$speed" ] && printf "\005{= cW}%sGHz\005{-} " $speed

3
debian/changelog vendored
View file

@ -5,8 +5,9 @@ byobu (2.9) unreleased; urgency=low
* bin/wifi-quality, bin/network-up, bin/network-down: must use /sbin
in iwconfig and ifconfig paths
* bin/cpu-count: performance improvement, use getconf
* bin/cpu-freq: performance improvement, simplify pipes
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 08 Jun 2009 11:27:52 -0500
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 08 Jun 2009 11:38:05 -0500
byobu (2.8-0ubuntu1) karmic; urgency=low