![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with mail command | hern14 | UNIX for Dummies Questions & Answers | 2 | 05-15-2008 10:25 AM |
| Mail command | FeNiCrC_Neil | UNIX for Dummies Questions & Answers | 2 | 08-31-2007 02:12 PM |
| mail command on sco box | benefactr | UNIX for Advanced & Expert Users | 0 | 08-17-2007 06:29 PM |
| mail command | habuzahra | UNIX for Dummies Questions & Answers | 4 | 01-08-2007 09:00 AM |
| Help with mail command | Rohini Vijay | Shell Programming and Scripting | 7 | 08-01-2006 05:42 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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 |
|
||||
|
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 06:07 AM.. |
![]() |
| Bookmarks |
| Tags |
| unix commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|