12 lines
245 B
Bash
12 lines
245 B
Bash
# Find process and filter.
|
|
# Usage: ps [PROCESS]
|
|
function ps() {
|
|
local process="${1}"
|
|
|
|
if [[ "${process}" = "" ]]; then
|
|
/usr/bin/env ps aux
|
|
else
|
|
/usr/bin/env ps aux | sed -n -e "1p" -e "/${process}/Ip" | sed -e "/sed -n -e 1p -e/d"
|
|
fi
|
|
}
|