From: Chris Koeritz Date: Mon, 14 Jan 2013 15:52:35 +0000 (-0500) Subject: new script is handy; just lists process names for a particular user. just use a... X-Git-Tag: 2.140.90~1144 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=6c50d90a24c823e34878034fa7ae211e235454ec;p=feisty_meow.git new script is handy; just lists process names for a particular user. just use a user of "." if you want to list all users process names. --- diff --git a/scripts/processes/list_process_names.sh b/scripts/processes/list_process_names.sh new file mode 100644 index 00000000..4808169a --- /dev/null +++ b/scripts/processes/list_process_names.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# looks for process names for a particular user. if no user is specified, then this +# assumes we should look for the current user's processes. + +user="$1" +if [ -z "$user" ]; then + user="$USER" +fi + +ps wuax | grep $user | awk '{ print $11; }'