Last active
May 21, 2017 22:59
-
-
Save tjcelaya/f0c7d2fe185cf622dfdaf9294bf43cf5 to your computer and use it in GitHub Desktop.
shortcuts for the laziest of the lazy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function aq { | |
# provide the column number ($1) to awk, and optionally the column separator ($2) | |
local fs=$( [ $# -ge 2 ] && echo "-F'$2'") | |
eval awk "$fs" "'{print \$$1}'" | |
} | |
function port-clear { | |
# slaughter whatever process is on port number ($1) | |
netstat -plnt | grep ":$1" | awk '{ split($NF,pd,"/"); print pd[1] }' | xargs kill -9 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment