LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-21-2015, 10:36 PM   #1
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Smile search eml file


hello guys, any ideas of a free software to search eml file contents?

What I mean is if i have a hundreds of eml files in a single folder, i just want to search for a keyword or phrase that will search the contents of the eml file and save a text result for eml files that matches the search keyword or phrase.

So there will be no need to open one by one the eml file.

Thank you.
 
Old 10-21-2015, 10:44 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I believe these are text files. If so, a simple grep will help.
Code:
grep <whatever option just prints the file name, not the whole line> keyword *.eml > outputfile
<whatever option just prints the file name, not the whole line> is left as an exercise to the reader.

Last edited by berndbausch; 10-22-2015 at 01:53 AM.
 
2 members found this post helpful.
Old 10-22-2015, 02:28 AM   #3
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by berndbausch View Post
I believe these are text files. If so, a simple grep will help.
Yes, this is true. And since I was recently forced to do just this kind of operation I can testify that it works. I actually used less to search the .eml file (an Inbox), but grep will work too of course.

Best regards,
HMW
 
Old 10-22-2015, 02:44 AM   #4
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Hi All, thanks for your reply guys.

Yes it indeed works.

For the benefit of others who will bump to this thread or will have same issue I used this command:

grep -R -H "MyKeyword" *.eml > output.txt

Thank you guys.
 
  


Reply

Tags
eml, 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
Mass EML Send chantman Linux - Software 2 09-05-2012 07:21 PM
Emails With .EML Attachment SBN Linux - General 7 07-09-2012 03:26 AM
Postfix send eml file officecase Linux - Server 2 08-12-2009 09:50 AM
eml format, linux Dave97 Linux - Newbie 3 08-10-2009 07:35 AM
how to open .eml file marlaina1 Linux - General 3 09-30-2006 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:56 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
Open Source Consulting | Domain Registration