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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -