Advertisement
Guest User

Untitled

a guest
Jul 14th, 2024
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.36 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. set -eu
  4.  
  5. where="$1"
  6.  
  7. IFS=$'\n'
  8. for subdir in $(find "$where" -maxdepth 1 -mindepth 1 -type d)
  9. do
  10.         #echo --withdir "$subdir"
  11.  
  12.         # find files in $d and iterate over those
  13.         for f in $(find "$subdir" -type f)
  14.         do
  15.                 echo ----with file "$f"
  16.                 file "$f"
  17.         done
  18.         echo
  19. done
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement