bash - Unix - batch file to unzip folder with specific name -


i need batch script unix don't know well.

i have folder , subfolder

a\a1\b\c\file.zip a\a2\b\c\otherfile.zip a\a3\b\c\thirdfile.zip 

each zip file contains xml file , text file

the script have 2 things:

  1. unzip zip files in folder named 'c' of sub folder of 'a' ; unzipped files should stay in same folder in zip
  2. all unzipped files have xml extension have been renamed

someone can me?

thank much

you can this.

    #find folder 'c' , unzip zip files     folder in `find ./a -name c -type d`; unzip $folder/data.zip -d $foler; done      #find .xml files , change extension .edefg     file in `find ./a -name *.xml -type f`;  mv "$file" "${file%.xml}.edefg"; done 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -