searchDir="[SEARCHDIR]";IFS=$'\n';folder=$(date "+%Y-%m-%d-%H-%M-%S");mkdir $folder && pushd $folder && for string in $(find "${searchDir}" -d 3 -iname 'info.plist' -exec awk '/CFBundleShortVersionString/ {if(match(FILENAME,"[^/]+\.app")){name=substr(FILENAME,RSTART,RLENGTH);path=substr(FILENAME,0,RSTART+RLENGTH-1)}n=split(FILENAME,a,"/");getline;sub("/","");n=split($0,b,"<string>");name2=a[3];version=b[2];gsub(" ","_",name);printf "path=\"%s\";name=\"%s\";version=\"%s\"\n",path,name,version}' {} \;); do echo  "${string}";eval ${string}; file "${path}";s2="ditto -c -k --sequesterRsrc --keepParent \"$path\" \"$path.$version.zip\"";echo $s2;eval $s2;done && popd