Bash Script to find all .zip files in a folder, search the .zip contents and move them to another folder -
i need write linux script find *.zip
files inside specified folder. then, search "_xx.xml
" files inside zip file. , move these zip files containing "*_xx.xml
" directory.
try one:
folder='/path/to/somewhere' another='/path/to/another' find "$folder" -type f -iname '*.zip' | while read file; unzip -lqq "$file" '*_xx.xml' >/dev/null && echo mv -v "$file" "$another"/ done
remove echo
when find working already.
Comments
Post a Comment