DEV Community

Discussion on: What's your current favorite shell command?

Collapse
 
aminnairi profile image
Amin • Edited
$ for file in folder/**/*.pdf; do echo $file; done

This one is my favorite because it allows for a recursive for loop in ZSH. You could use find to do the job, but you can have variables and write visually better code with this for loop.

Note that it might not work in Bash.

I would be happy to learn an even better way of doing it though!