LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-31-2003, 11:04 AM   #1
pinataHead
LQ Newbie
 
Registered: Jul 2003
Location: Boston
Distribution: RedHat 9.0
Posts: 4

Rep: Reputation: 0
Question Is there a way to 'grep' ms office docs in linux?


I have a bunch of ms office docs that I need to sort through, looking for certian key words. Instead of opening the doc and reading it (boooring), I was hoping I could somehow 'grep' through everything.

For example something of the like..

foreach $file in *.doc do
if $(cat $file | grep FOO)
echo $file has FOO
fi
done

Obviously 'cat' won't work, but I was hoping something else would.

Thanks in advance....
 
Old 10-31-2003, 11:26 AM   #2
musrum
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 112

Rep: Reputation: 15
strings $file | grep FOO

Should work unless the word you are searching for is broken by an edit.
 
Old 10-31-2003, 12:05 PM   #3
pinataHead
LQ Newbie
 
Registered: Jul 2003
Location: Boston
Distribution: RedHat 9.0
Posts: 4

Original Poster
Rep: Reputation: 0
That seemed to work well enough for I wanted to do.. Thanks!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Evolution - open word docs with open office (not KWord) bcarl314 Mandriva 1 06-11-2005 09:18 AM
linux docs for noobs fenderman11111 General 5 10-25-2004 10:12 PM
Open Office docs for Microsoft Office btexpress Linux - Software 2 05-17-2004 12:26 PM
Format Problems Saving Star Office Docs in Word Format kkempter Linux - Software 4 08-27-2003 04:23 PM
Best Linux WP for Hyperlinked Docs? MikHud Linux - Software 2 05-28-2002 12:19 AM


All times are GMT -5. The time now is 09:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration