0

I want to run Hunspell in all subdirectories and check all the markdown files in there.

Easy right?

So I wrote: find ./ -type f -exec hunspell -l *.md {} \;

When I run this command it shows much more than only the three test markdown files. What is wrong with this command?

PS:
-l means that Hunspell will only output the words that have a spelling error.

Baris Demiray
  • 1,539
  • 24
  • 35
Bob van Luijt
  • 7,153
  • 12
  • 58
  • 101

1 Answers1

0

You could look for only the *.md files,

find . -iname '*.md' -type f -exec hunspell -l {} \;

Since you are not looking for a certain file name pattern, passing {} like that to hunspell means every file.

Update: added the quotes to the initial answer

Bob van Luijt
  • 7,153
  • 12
  • 58
  • 101
Baris Demiray
  • 1,539
  • 24
  • 35