Fixed the uname -s output case statement issue
This commit is contained in:
parent
3ec7e1a038
commit
87ef58abfc
1 changed files with 4 additions and 3 deletions
|
@ -8,12 +8,12 @@ get_percent()
|
||||||
echo $percent
|
echo $percent
|
||||||
;;
|
;;
|
||||||
|
|
||||||
Mac)
|
Darwin)
|
||||||
percent=$(ps -A -o %cpu | awk '{s+=$1} END {print s "%"}')
|
percent=$(ps -A -o %cpu | awk '{s+=$1} END {print s "%"}')
|
||||||
echo $percent
|
echo $percent
|
||||||
;;
|
;;
|
||||||
|
|
||||||
Windows)
|
CYGWIN*|MINGW32*|MSYS*|MINGW*)
|
||||||
# TODO - windows compatability
|
# TODO - windows compatability
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -25,5 +25,6 @@ main()
|
||||||
echo "CPU $cpu_percent"
|
echo "CPU $cpu_percent"
|
||||||
sleep 10
|
sleep 10
|
||||||
}
|
}
|
||||||
|
|
||||||
# run main driver
|
# run main driver
|
||||||
main
|
main
|
||||||
|
|
Loading…
Reference in a new issue