Add filter_by_column_value shell function

This commit is contained in:
Ivan Malison 2016-08-16 21:20:29 -07:00
parent a4ec8f17d1
commit b107581b2f
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -108,6 +108,10 @@ function get_cols() {
awk -f "$HOME/.lib/get_cols.awk" -v "cols=$*" -v "FS=$FS"
}
function filter_by_column_value {
awk '$'"$1"' == '"$2"' { print $0 }'
}
function find_all_ssh_agent_sockets() {
find /tmp -type s -name agent.\* 2> /dev/null | grep '/tmp/ssh-.*/agent.*'
}