dharmit / tinyutils

Small utils to print Linux system info in a prettier format
MIT License
4 stars 8 forks source link

Getting error in code. #18

Open rohansharma777 opened 9 years ago

rohansharma777 commented 9 years ago

top -bn1 | grep "Cpu(s)" | \ sed "s/., *([0-9.])%* id.*/\1/" | \ awk '{print 100 - $1"%"}'


The above script is for getting cpu usage in %tage out of 100. I tried using it but it's throwing error related to invalid syntax specially for ' ' and | characters.