LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Searching for attachments in email

[ILUG] Searching for attachments in email

Thomas Rooney tom at netsys.ie
Tue Feb 6 17:30:06 GMT 2007


Pádraig Brady wrote:
> Thomas Rooney wrote:
>   
>> I posted this earlier from an other account might it have
>> gone for moderation?
>>
>> HI All
>>
>>    I need to search an excel document for the  word " brno"
>> the problem and the point where this relates to Linux is the
>> excel docs that need to be searched are in attachments
>> in users email accounts. The server is running courier-imap
>> on SUSE 9.3.
>>
>>    What I think I need to do is find some way to find all files
>> created between two dates (I have a date range) and
>> have an attached excel file with the at lest one of the words
>> "over" or "held" in the file name then extract the attached
>> excel files and copy them to some place on my local PC
>> its running Ubunut 6.10.Then run an open office macro over
>> them to find the phrase I require
>>
>>    How would one extract the excel files without going in via
>> the imap server as this would be tedious because of the amount
>> of email accounts on the box and the number of folders in each
>> account.
>>
>> I have root on this box  and can ssh to it. Any Ideas.
>>     
>
> Untested...
>
> find ~/Maildir/ -type f -print0 | #man find to specify dates
> LANG=C xargs -r0 grep -Fl 'Content-Type: application/vnd.ms-excel' |
> while read file; do
>   recode /b64.. < $file | grep -qF " brno" &&
>   echo $file
> done
>   
Looks great! Ill let you know how it goes.



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell