I'm working on google colaboratory and i have to do some elaboration to some files based on their extensions, like:
!find ./ -type f -name "*.djvu" -exec file '{}' ';'
and i expect an output:
./file.djvu: DjVu multiple page document
but when i try to mix bash and python to use a list of exensions:
for f in file_types:
!echo "*.{f}"
!find ./ -type f -name "*.{f}" -exec file '{}' ';'
!echo "*.$f"
!find ./ -type f -name "*.$f" -exec file '{}' ';'
i get only the output of both the echo but not of the files.
*.djvu
*.djvu
*.jpg
*.jpg
*.pdf
*.pdf
If i remove the exec part it actually find the files so i can't figure out why the find command combined with exec fail in some manner.
If needed i can provide more info/examples.