| Article: |
The Power of mdfind | |
| Subject: | mdfind2 | |
| Date: | 2006-01-06 11:00:41 | |
| From: | kwidholm | |
|
Response to: mdfind2
|
||
|
That's a nice program, but too bad you decrease its usefulness and adaptability by making it a standalone replacement for mdfind instead of something that you can pipe mdfind into. Why not follow the flexibility and power of the command line tradition by making your program usable like this: mdfind "search terms" | mdxml > found_items.xml
|
||
Showing messages 1 through 1 of 1.
-
mdfind2
2006-01-07 22:42:12 schwa [View]



mdfind -0 'foo' | xargs -o mdls --xml
Unfortunately mdls doesn't take a --xml switch. So I'd have to write a "mdls2" command and I bet someone would complain that "too bad you decrease its usefulness and adaptability by making it a standalone replacement for mdfind".
Of course if you truly wished to harness the "flexibility and power of the command line tradition" then you could take the output of mdfind, pipe it through xargs and mdls and then through some awful sed/awk/perl abomination to convert the output of mdls into xml... I'm sure it would be extremely graceful, easy to use and easy to maintain...