getting the ip job more up to date. still needs newer automation url.
[feisty_meow.git] / scripts / core / functions.sh
index 61e19c4abf32c2cb5d42c444dedcaed3a9a33483..20bb047567d2e0fd831c5eab79cdce9b2a57c640 100644 (file)
@@ -99,11 +99,15 @@ if [ -z "$skip_all" ]; then
   # finds all processes matching the pattern specified and shows their full
   # process listing (whereas psfind just lists process ids).
   function psa() {
-    p=$(psfind "$1")
-    if [ -z "$p" ]; then
+    if [ -z "$1" ]; then
       echo "psa finds processes by pattern, but there was no pattern on the command line."
       return 1
     fi
+    p=$(psfind "$1")
+    if [ -z "$p" ]; then
+      # no matches.
+      return 0
+    fi
     echo ""
     echo "Processes containing \"$1\"..."
     echo ""