Friday, 1 February 2013

Execute a bash script on multiple folders


curdir=$(pwd)
for folder in /path/to/Files/*; do 
  [ -d $folder ] && cd "$folder" && bash /path/to/conv.sh
done
cd $curdir

No comments:

Post a Comment