trying to get psfind working for windoze again.
authorChris Koeritz <fred@gruntose.com>
Tue, 11 Mar 2014 22:43:47 +0000 (18:43 -0400)
committerChris Koeritz <fred@gruntose.com>
Tue, 11 Mar 2014 22:43:47 +0000 (18:43 -0400)
scripts/core/functions.sh

index 16c4473931071d695e23ed0952345fb9e2b5d782..9740d2a158d70fdf2100f4a79d7f10b3fd4e97b6 100644 (file)
@@ -99,9 +99,10 @@ if [ -z "$skip_all" ]; then
       # we 'type' the file to get rid of the unicode result from wmic.
       cmd $flag type "$tmppid" >$PID_DUMP
       \rm "$tmppid"
-      local CR='
-'  # embedded carriage return.
-      local appropriate_pattern="s/^.*  *\([0-9][0-9]*\)[ $CR]*\$/\1/p"
+#      local CR='
+#'  # embedded carriage return.
+#      local appropriate_pattern="s/^.*  *\([0-9][0-9]*\)[ $CR]*\$/\1/p"
+      local appropriate_pattern="s/^.*  *\([0-9][0-9]*\)*\$/\1/p"
       for i in "${patterns[@]}"; do
         PIDS_SOUGHT+=($(cat $PID_DUMP \
           | grep -i "$i" \