Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for ext in bundle text unity3d audio tx2d; do
- echo "EXT: $ext"
- for file in $(find $DIR_A -name "*$ext" | sort); do
- matcher=$(echo $file | sed s#\.[0-9]*\.$ext\$##)
- matcher="$matcher.*.$ext"
- siblings=$(find $DIR_A -wholename "$matcher" | sort)
- removeList=($siblings)
- unset removeList[${#removeList[@]}-1]
- if [ ! -z "$removeList" ]; then
- echo "File: $file"
- for remove in "${removeList[@]}"; do
- echo " Remove: $remove"
- rm $remove
- done
- fi
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement