aboutsummaryrefslogtreecommitdiff
path: root/bin/pss
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-10-10 23:12:02 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-10-10 23:12:02 +0200
commit125237e4a7cf7e6d2ec28565d4403ab9c9908d85 (patch)
tree7a073506aa1f8c45fdee7f09a9aab03c99e9ee86 /bin/pss
parent4d23cadff2f75d1b6311d509ecd07e8330071906 (diff)
downloaddotfiles-125237e4a7cf7e6d2ec28565d4403ab9c9908d85.tar.gz
dotfiles-125237e4a7cf7e6d2ec28565d4403ab9c9908d85.zip
add generic shell helper scripts
Diffstat (limited to 'bin/pss')
-rwxr-xr-xbin/pss15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/pss b/bin/pss
new file mode 100755
index 0000000..223b10e
--- /dev/null
+++ b/bin/pss
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Print info for running processes mathing PATTERN
+
+# Author: Florian Fischer
+# License: WTFPL
+
+if test -z "$1"
+then
+ echo "Usage: $0 PATTERN"
+ exit 1
+fi
+
+PIDS=$(pgrep -d , -f $1)
+test -n "$PIDS" && ps -Fp $PIDS