I posted an example for searching and returning the lines containing a string in the Omnigraffle group, but it doesn’t work the same way for OmniOutliner.
mdfind -onlyin . kind:OmniOutliner Peter -0 | xargs -0 zgrep -rl “Peter” *.xml
this works, but only works on the old oo3 format. kind: OmniOutliner doesn’t find .ooutline files.
I tried specifying OmniOutliner4 and 5 but that returned nothing.
mdfind -onlyin . *.ooutline Peter -0 | xargs -0 zgrep -rl “Peter” *.xml
hmm maybe a plain old Find would work better here…
mdfind -onlyin . kind: “OmniOutliner Document” Peter
/Users/michaelisbell/OmniPresence2/story points 3.ooutline
/Users/michaelisbell/OmniPresence2/bsnt-mapping-outline (conflict 3 from michaelisbell on michaels-MacBook-Pro-Early-2015).ooutline
this worked…and then probably just a grep
mdfind -onlyin . kind: “OmniOutliner Document” Peter -0 | xargs -0 zgrep -r “Peter” .
hmm this seems to get more than I wanted. … zgrep doesn’t seem to pick up the piped filenames in this case…hmm