Search Bear notes using `grep` command

You can use the same grep command as mentioned in the question, to search through the contents of .md files exported by Bear. For instance, use

grep pattern *.md

to search for pattern in .md files in the current directory. You can use -i option to ignore case or -n to print line number in file.