Skip to content

Instantly share code, notes, and snippets.

@128keaton
Last active September 30, 2019 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 128keaton/8b7f3c52a53f499e3adc668cf1eed19f to your computer and use it in GitHub Desktop.
Save 128keaton/8b7f3c52a53f499e3adc668cf1eed19f to your computer and use it in GitHub Desktop.
#!/bin/bash
## INCORRECT
$(top -bn1 | grep load | awk '{printf"%.2f%%\t\t\n", $(NF-2)}')
#!/bin/bash
top -bn1 | grep load | awk '{printf"%.2f%%\t\t\n", NF-2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment