어떤 디렉토리에 zip 파일이 여기저기 있는데 다 풀고 싶다고 했다.
그래서 어떻게 하면 좋을까를 질문을 facebook에서 보았다. 
그래서 배치파일을 하나 작성해 보았다.  그러는 사이 질문이 사라졌다. 
아쉬어 그냥 IDCHOWTO에 이글을 남겨요. 
cat recur-unzip.sh 
#!/bin/bash
getRand
{
    RandSeq=$(openssl -hex -rand 10  )
   if [ -e $1.$RandSeq ] ; then 
    getRand $1
   else
    echo $1.$RandSeq
   fi
}
getUnzippedDirectory
{
    unzipped=$(basename $1 .zip)
    if [  -e $unzipped ] ; then
        getRand  $unzipped
    fi 
}
main_loop
{
    find $root_dir -maxdepth 1  -name '*.zip' | while read f ; do 
    unzipped=$(getUnzippedDirectory $f)
    unzip -d $unzipped $f 
    done
    find $root_dir -maxdepth 1 -type d | while read f ; do 
    main_loop $f
    done
}
if [  -d "$1" ] ; then 
    main_loop $1
else
    echo -n example:
    echo $0 $(pwd)
fi
		
							





