Sponsored Content
Top Forums Shell Programming and Scripting Reading a mailbox and sending new messages to a text file Post 302186507 by rsw626 on Thursday 17th of April 2008 11:40:40 AM
Old 04-17-2008
Reading a mailbox and sending new messages to a text file

I'm new to scripting and have been tasked with creating a script that will read a mailbox, such as /var/mail/user1, scan it for new messages, then send those new messages to another file.

It also has to be looped to run almost continuously.

Any help would be greatly appreciated
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading text from a file

Guys, I am trying to read text from a file, into arrays. The format of the file is: @DATABASE femotest @PACKAGE_SPECS /usr/home/oracle92/sosa/scripts/test.pks /usr/home/oracle92/sosa/scripts/rep.pks @PACKAGE_BODIES ... (12 Replies)
Discussion started by: LiquidChild
12 Replies

2. Shell Programming and Scripting

Attaching file and sending text in body using sendmail command!!

Hello, I need to send with text in the body and 2 files as attachments using sendmail command. i can send only one at a time either attachment or text in body of email. Can any one please help me how to get that? I will be great for any help. Thanks, Sparan (1 Reply)
Discussion started by: sparan_peddu
1 Replies

3. UNIX for Dummies Questions & Answers

sorting files with find command before sending to text file

i need help with my script.... i am suppose to grab files within a certain date range now i have done that already using the touch and find command (found them in other threads) touch -d "$date_start" ./tmp1 touch -d "$date_end" ./tmp2 find "$data_location" -maxdepth 1 -newer ./tmp1 !... (6 Replies)
Discussion started by: deking
6 Replies

4. UNIX for Advanced & Expert Users

Reading a file and sending mail based on content of the file

Hi Gurus, I am having an requirement. i have to read a list file which contains file names and send mail to different users based on the files in the list file. eg. if file a.txt exists then send a mail to a@a.com simillary for b.txt,c.txt etc. Thanks for your help, Nimu (6 Replies)
Discussion started by: nimu1979
6 Replies

5. Programming

reading a text file in c++

hello all , im trying to read a text file and display its contents. While i got the code running and the output was displayed perfectly for sometime , i started getting Abort(core dump) error . Am i missing something here ? im using HP-UX. #include <iostream.h> #include <fstream.h> #include... (1 Reply)
Discussion started by: vishy_85
1 Replies

6. Shell Programming and Scripting

Problem with sending email(to include contents of text file)

Hello, I was using a shell script for sending contents of a text file(email.report) to different users. I was using the below command in my script to send email... cat email.report | /usr/bin/mailx -s $REQ_SUBJECT -h 5 abc@xyz.com It was working fine all these days but now all of a sudden it... (18 Replies)
Discussion started by: smarty86
18 Replies

7. Shell Programming and Scripting

Reading a file and sending mail by shell scripting?

hi I need help urgently...i need to write a shell script which can solve the following problem....its urgent plz help me out coz m totally newbie in shell scripting.... the problem is: Suppose I have a folder called logs. whenever some error occurs some correspondence error file is generated. I... (4 Replies)
Discussion started by: sukhdip
4 Replies

8. Shell Programming and Scripting

Weird ? symbol coming through-sending text file

Hi All, When I am trying to send a text file through Unix,I get a weird symbol in the .txt file. The symbol is ? in a box (square)....which is making the file unloadable. Please help me with the solution. Thanks in advance Gopi (1 Reply)
Discussion started by: gopi.palleti
1 Replies

9. UNIX for Dummies Questions & Answers

Sending mail to multiple recipient added in a text file

I am trying to find a code that can help me mail to a list of recipients which are in a text file. Sample code $cat recipient.txt me@test.com me1@test.com me2@test.com I want a mailx step that can read contents of recipient.txt and mail to all the users. I don't want to use mails... (1 Reply)
Discussion started by: Gurkamal83
1 Replies

10. Programming

How to write in other language in text/xml file by reading english text/xml file using C++?

Hello Team, I have 2 files.one contains english text and another contains Japanese. so i have to read english text and replace the text with Japanesh text in third file. Basically, I need a help to write japanese language in text/xml file.I heard wstring does this.Not sure how do i write... (2 Replies)
Discussion started by: SA_Palani
2 Replies
COMSAT(8)						    BSD System Manager's Manual 						 COMSAT(8)

NAME
comsat -- biff server SYNOPSIS
comsat DESCRIPTION
The comsat utility is the server process which receives reports of incoming mail and notifies users if they have requested this service. The comsat utility receives messages on a datagram port associated with the ``biff'' service specification (see services(5) and inetd(8)). The one line messages are of the form: user@mailbox-offset[:mailbox-name] If the user specified is logged in to the system and the associated terminal has the owner execute bit turned on (by a ``biff y''), the offset is used as a seek offset into the appropriate mailbox file and the first 7 lines or 560 characters of the message are printed on the user's terminal. Lines which appear to be part of the message header other than the ``From'', ``To'', ``Date'', or ``Subject'' lines are not included in the displayed message. If the user specified is logged in to the system and the associated terminal has the group execute bit turned on (by a ``biff b''), two bell characters (ASCII 07) are printed on the user's terminal. If mailbox-name omitted, standard mailbox assumed. FILES
/var/run/utx.active to find out who is logged on and on what terminals /var/mail/user standard mailbox SEE ALSO
biff(1), inetd(8) HISTORY
The comsat utility appeared in 4.2BSD. BUGS
The message header filtering is prone to error. The density of the information presented is near the theoretical minimum. Users should be notified of mail which arrives on other machines than the one to which they are currently logged in. The notification should appear in a separate window so it does not mess up the screen. BSD
January 21, 2010 BSD
All times are GMT -4. The time now is 11:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy