summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtmw-info4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmw-info b/tmw-info
index 8a7cfcf..628ee9c 100755
--- a/tmw-info
+++ b/tmw-info
@@ -298,7 +298,7 @@ elif [ "$1" == "mob-search" ]; then
#echo "LAST_COUNT: $LAST_COUNT"
done
while IFS= read -r LINE; do
- MOB_ID=$(echo "$LINE" | awk '{print $1}')
+ MOB_ID=$(echo "$LINE" | awk '{print $1}' | sed 's/,//g')
DROP_IDS=($(echo "$LINE" | awk -F ',' '{print $30 $32 $34 $36 $38 $40 $42 $44}' | sed -E 's/ 0,//g' | sed 's/,//g' | sed -E 's/^\s*//g'))
DROP_PERCS=$(echo "$LINE" | awk -F ',' '{print $31 $33 $35 $37 $39 $41 $43 $45}' | sed -E 's/ 0,//g' | sed 's/,//g' | sed -E 's/^\s*//g')
if [[ $(ls "$ITEM_DIR"/* 2> '/dev/null') != '' ]]; then
@@ -330,7 +330,7 @@ elif [ "$1" == "mob-search" ]; then
mv "$TMW_INFO/mob-drops-$MOB_ID.tmp.tmp" "$TMW_INFO/mob-drops-$MOB_ID.tmp"
DROP_COUNT=$(( DROP_COUNT + 1 ))
done
- DROPS=$(cat < "$TMW_INFO/mob-drops-$MOB_ID.tmp" | sed 's/^$//g' | sed -E 's/,\s*$//g')
+ DROPS=$(sed 's/^$//g' "$TMW_INFO/mob-drops-$MOB_ID.tmp" 2> '/dev/null' | sed -E 's/,\s*$//g')
echo -e "\
ID: $(echo "$LINE" | awk '{print $1}') NAME: $(echo "$LINE" | awk '{print $2 $3}') LVL: $(echo "$LINE" | awk '{print $4}')\n\
HP: $(echo "$LINE" | awk '{print $5}') SP: $(echo "$LINE" | awk '{print $6}') \