projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new fortune.
[feisty_meow.git]
/
scripts
/
core
/
functions.sh
diff --git
a/scripts/core/functions.sh
b/scripts/core/functions.sh
index c72a80aa4927b6a49f662dd37ad63bf974ec2796..8a2f35865a36c59cad49bda5ef6c63af8c465cf9 100644
(file)
--- 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"
# 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" \
for i in "${patterns[@]}"; do
PIDS_SOUGHT+=($(cat $PID_DUMP \
| grep -i "$i" \
@@
-122,11
+123,10
@@
if [ -z "$skip_all" ]; then
done
fi
if [ ${#PIDS_SOUGHT[*]} -ne 0 ]; then
done
fi
if [ ${#PIDS_SOUGHT[*]} -ne 0 ]; then
- local
TMPFUD=$(mktemp $TMP/junkpids.XXXXXX
)
- printf -- '%s\n' ${PIDS_SOUGHT[@]} | sort | uniq >$TMPFUD
- PIDS_SOUGHT=$
(cat $TMPFUD)
+ local
PIDS_SOUGHT2=$(printf -- '%s\n' ${PIDS_SOUGHT[@]} | sort | uniq
)
+ PIDS_SOUGHT=()
+ PIDS_SOUGHT=$
{PIDS_SOUGHT2[*]}
echo ${PIDS_SOUGHT[*]}
echo ${PIDS_SOUGHT[*]}
-#rm $TMPFUD
fi
/bin/rm $PID_DUMP
}
fi
/bin/rm $PID_DUMP
}