change_integrator_all.sh 433 B

12345678910111213141516171819
  1. #! /bin/bash
  2. main_folder="./"
  3. prefix="p3d_"
  4. for folder in $(ls -d -- ${main_folder}*/)
  5. do
  6. for file in $(ls $folder)
  7. do
  8. filename=$folder$file
  9. filename_fixed=${filename//\/\//\/}
  10. # check if filename contains
  11. if [[ "$file" == ${prefix}* ]]; then
  12. echo "Update Integrator into ${filename_fixed}"
  13. python utils/change_integrator_pbrt.py --prefix ${prefix} --pbrt ${filename_fixed}
  14. fi
  15. done
  16. done