3

With grep, I can search through the content of all the files in a directory, for an instance:

grep 'program' *.md

searches for the pattern program within the content of all .md files in the current directory.

How do I search the Bear notes in Terminal using thegrep command?

  • do you have the locate command? – Michael Ilie Mar 26 '18 at 13:39
  • Please specify if you wish to search for the Bear notes files or search within the contents of the Bear notes files? For the former case you can use find command and for the latter you can use grep command. – Nimesh Neema Mar 26 '18 at 13:51
  • I want to search the contents of Bear notes. @NimeshNeema – Algebra Mar 26 '18 at 14:53
  • You can only search through the exported .md files created with Bear using the command line. – Nimesh Neema Mar 26 '18 at 15:47
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .