fix_permissions.sh 147 B

12345678
  1. #!/bin/bash
  2. for file in $(find . -type f); do
  3. if [ "$(head -c 2 $file)" == "#!" ]; then
  4. chmod u+x $file
  5. else
  6. chmod a-x $file
  7. fi
  8. done