Skip to content

Instantly share code, notes, and snippets.

@mittenchops
Created March 18, 2013 14:46
Show Gist options
  • Select an option

  • Save mittenchops/5187657 to your computer and use it in GitHub Desktop.

Select an option

Save mittenchops/5187657 to your computer and use it in GitHub Desktop.
Trying to learn awk and better command line usage, I made a simple one-line replica of the unix program top.
watch -n 0.1 "ps aux | awk 'NR>1{print \$2 \"\t\" \$3 \"\t\" \$10 \"\t\" \$11}' | sort -nrk 2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment