Skip to content

Instantly share code, notes, and snippets.

@flavorjones
Created February 5, 2009 01:24
Show Gist options
  • Save flavorjones/58476 to your computer and use it in GitHub Desktop.
Save flavorjones/58476 to your computer and use it in GitHub Desktop.
# bash function "awkp" for grabbing fields from output
# e.g., "ps -ef | fgrep mongrel | awkp 2 | xargs kill"
function awkp {
narg=$1
awk "{print \$$1}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment