Fix map analyzer

This commit is contained in:
Varun Patil 2020-05-06 13:32:02 +05:30
parent 47ee508ae5
commit 2e366a713e
1 changed files with 43 additions and 41 deletions

View File

@ -29,48 +29,50 @@ while IFS= read -r line; do
if [[ $line == *":"* ]]; then if [[ $line == *":"* ]]; then
value=${line#*:} value=${line#*:}
value=${value//[[:blank:]]/}
value=${value//\'}
re="^[0-9.-]+$"
if [[ $value =~ $re ]] ; then
continue
fi
re='^EV[0-9]+$'
if [[ $value =~ $re ]] ; then
continue
fi
if [[ $value == 'A' ]] ; then
continue
fi
if [[ $value == "''" ]] ; then
continue
fi
if [ -z "$value" ] ; then
continue
fi
if [[ " ${ARRAY[@]} " =~ " ${value} " ]]; then
continue
fi
echo $value
ARRAY+=($value)
files="$(find -name "$value.*")"
files="${files//\.\/}"
if [ -z "$files" ] ; then
continue
fi
echo "$files"
ARRAYFILES+=($files)
fi fi
if [[ $line == *"-"* ]]; then
value=${line#*-}
fi
value=${value//\*}
value=${value//[[:blank:]]/}
value=${value//\'}
re="^[0-9.-]+$"
if [[ $value =~ $re ]] ; then
continue
fi
re='^EV[0-9]+$'
if [[ $value =~ $re ]] ; then
continue
fi
if [[ $value == 'A' ]] ; then
continue
fi
if [ -z "$value" ] ; then
continue
fi
if [[ " ${ARRAY[@]} " =~ " ${value} " ]]; then
continue
fi
echo $value
ARRAY+=($value)
files="$(find -name "$value.*")"
files="${files//\.\/}"
if [ -z "$files" ] ; then
continue
fi
echo "$files"
ARRAYFILES+=($files)
done < dump.yml done < dump.yml
rm dump.yml rm dump.yml