[SOLVED] string search in .odt document directories
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sure, because you can specify only one file as an argument to zipgrep. Besides, if your current directory is already ~/Documents then specifying Documents/*.odt is wrong.
I agree with what hish2021 said above, I also think a Bash script as suggested in #8 would serve you better.
Tried the command on a different directory - and managed to get some results. But am now even more puzzled - because it threw up filenames where the body of the files contains nary a mention of "Hindutva" - for instance, this - from a file named alice_impossible -
Alice laughed. “There’s no use trying,” she said: “one can’t believe impossible things.”
“I daresay you haven’t had much practice,” said the Queen. “When I was your age, I always did it for half-an-hour a day. Why, sometimes I’ve believed as many as six impossible things before breakfast.”
[Carroll, Through the Looking Glass, chapter 5.]
zipgrep treats an .odt file as a zip archive. It will search not only in the document text, but in the metadata, too. E.g. if the document was created by user Hindutva it will be matched.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.