![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with mail command | hern14 | UNIX for Dummies Questions & Answers | 2 | 05-15-2008 06:25 AM |
| Mail command | FeNiCrC_Neil | UNIX for Dummies Questions & Answers | 2 | 08-31-2007 10:12 AM |
| mail command on sco box | benefactr | UNIX for Advanced & Expert Users | 0 | 08-17-2007 02:29 PM |
| mail command | habuzahra | UNIX for Dummies Questions & Answers | 4 | 01-08-2007 05:00 AM |
| Help with mail command | Rohini Vijay | Shell Programming and Scripting | 7 | 08-01-2006 01:42 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
mail command
i wanted to write a shell script that can automatically read unread mails and copy each one into a different file. I was trying to use the MAIL command to do it, but this command requires user input inbetween, I was wondering how that could be achieved in a shell script.
Can sumone please help. its urgent. please. Thanks |
| Forum Sponsor | ||
|
|
|
|||
|
I've written several different scripts each, more or less, achieving the same thing. The easiest solution I've found is to set up an alias which pipelines the message into a script. From there you can use whatever UNIX commands you want to parse, filter, and rename the message. If you want to include attachments in your parsing, you'll need to install metamail or some such program to extract the MIME encoded bits.
It's a direction, not a complete answer -- all of my "notes" are at work. I hope it helps. |
|
|||
|
DOUBT - with the MAIL command
thanks a lot hegemaro but my problem was with the usage of the mail command. The MAIL command needs us to press the 'Enter' key or 'n' to move onto the next message once the present message has been viewed. How do I achieve this in order to automate the copying of successive mails. Can you please help.
THANKS... |
|
|||
|
Thanks a lot for that. But how do i delete the mail that has just been copied onto the file so that i can move on to check for my next new mail.
Also how do i get rid of all the headers that form a part of the mail which are not reqd. These headers do not turn up when the mail command is used on its own. Any help is welcome ... Thanks a looot .... Last edited by garric; 04-24-2006 at 02:07 AM. |
|||
| Google The UNIX and Linux Forums |