X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;h=ab883d9d6e6bce61ced2ffb806a2d352595262e3;hb=6ed6b13a3a3806c0f4dcb38ac145f6a295faa2fb;hp=16c4473931071d695e23ed0952345fb9e2b5d782;hpb=03c66529aa1ae2c83572bb02609edd60e233552e;p=feisty_meow.git diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 16c44739..ab883d9d 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -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" \ @@ -137,13 +138,13 @@ if [ -z "$skip_all" ]; then echo "psa finds processes by pattern, but there was no pattern on the command line." return 1 fi - p=$(psfind "$1") + p=$(psfind "${@}") if [ -z "$p" ]; then # no matches. return 0 fi echo "" - echo "Processes containing \"$1\"..." + echo "Processes matching ${@}..." echo "" if [ -n "$IS_DARWIN" ]; then unset fuzil_sentinel