Add _which() to alt_cmds.sh and update pt-stalk.

This commit is contained in:
Daniel Nichter
2012-02-02 12:04:28 -07:00
parent 4607cac898
commit 7be99c5140
3 changed files with 43 additions and 28 deletions

View File

@@ -43,6 +43,12 @@ _lsof() {
fi
}
_which() {
# which on CentOS is aliased to a cmd that prints extra stuff.
# Also, if the cmd isn't found, a msg is printed to stderr.
[ -x /usr/bin/which ] && /usr/bin/which "$1" 2>/dev/null | awk '{print $1}'
}
# ###########################################################################
# End alt_cmds package
# ###########################################################################