# for mdfind "phrase* " and "phrase! " also work, but not "phrase ! " mdfind -0 -onlyin ~ "phrase This is a" | xargs -0 grep -ails -E 'This is a phrase!' mdfind -0 "It's just $8.99!" | xargs -0 grep -ails -E "It's just \\\$8\\.99\\!" mdfind -0 'Fr\303\251d\303\251ric Chopin' | xargs -0 grep -ails -Z -E 'Fr.d.ric Chopin' | xargs -0 basename
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
grep-based phrase search with Spotlight (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» Regex-based file/folder sear... in grep regex shell osx mac mdfind
» Searching with grep & Spotli... in grep regex shell osx mac mdfind
» opening in a textmate projec... in grep regex shell osx mac unix textmate
» pcregrep - UTF-8 aware grep ... in grep perl shell osx mac bash unix utf8 UTF-8 pcre pcregrep multiline heirloom project
» Search for open files that w... in shell osx mac server command line
» Remove favicons from Safari'... in shell osx mac safari favicon
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails