utils
This commit is contained in:
13
utils/.local/bin/running
Executable file
13
utils/.local/bin/running
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
process_list="$(ps -eo 'pid command')"
|
||||
if [[ $# != 0 ]]; then
|
||||
process_list="$(echo "$process_list" | grep -Fiw "$@")"
|
||||
fi
|
||||
|
||||
echo "$process_list" |
|
||||
grep -Fv "${BASH_SOURCE[0]}" |
|
||||
grep -Fv grep |
|
||||
GREP_COLORS='mt=00;35' grep -E --colour=auto '^\s*[[:digit:]]+'
|
||||
Reference in New Issue
Block a user