how to grep the time of the mail received?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to grep the time of the mail received?
# 1  
Old 12-11-2009
how to grep the time of the mail received?

Hi all,

My question is how can we grep the time of the mail which we receive in our inbox?

like if i get a mail tonight at 10 i should be able to grep the time of it tomorrow morning or someother day in 24 hr format....

how can we do that?
# 2  
Old 12-11-2009
can you please explain it further with an example ?
# 3  
Old 12-13-2009
If you are talking about the "mailx" program that ships by default with most of the Unix/Linux systems, then you could use something like this for the time of the latest email:

Code:
mailx -H | tail -1 | awk '{print $4,$5,$6,$7}'

tyler_durden
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to find directory is getting files in every 10 mins, if not then when last time file received

Dears, I am looking for a script which will work as a watch directory. I ha directory which keep getting files in every 10 mins and some time delay. I want to monitor if the directory getting the files in every 10 mins if not captured the last received file time and calculate the delay. ... (6 Replies)
Discussion started by: sadique.manzar
6 Replies

2. Shell Programming and Scripting

Invoke a shell script in case mail with a specific subject is received

Hello fellow forum members, I have a script which returns a date (I can design the script to return the value in email), How can I design the script in AIX to invoke another shell script which performs some set of actions. Procmail doesnt work in AIX. (4 Replies)
Discussion started by: ektubbe
4 Replies

3. Shell Programming and Scripting

To trigger a mail if the files have been received

Hi All, i have a folder in which we receive 6 files daily. the file name will be appended with date for ex : files that we receive on 1/9/2013 will be like file1_20130108.txt.zip file1_20130108.txt file2_20130108.txt.zip file2_20130108.txt file3_20130108.txt.zip file3_20130108.txt the... (3 Replies)
Discussion started by: mahesh300182
3 Replies

4. Solaris

Mail from mailx not received

Hi , I'm trying to send a mail from a sunOS machine that is within hp network to my email: eman.el-badawy@hp.com ,the user trying to send is 'project',,but seems the mail address can not be resolved checking /var/log/syslog i got the following: Dec 25 14:34:02 svddev15 sendmail: ... (1 Reply)
Discussion started by: Eman_in_forum
1 Replies

5. Shell Programming and Scripting

Is it possible to get the date and time of mail which we get into our inbox using shell script?

Hello All, I need a script which extarct the date and time of the mail which is there in our inbox... I can export the mail copy into desktop making it as a textfile or something like that.. So is there anyway to get the date and time from that? (3 Replies)
Discussion started by: smarty86
3 Replies

6. UNIX for Advanced & Expert Users

Unknown Attachment received on html mail

Hello, Getting an extra attachment when i send a mail using below code. The body and the rest of the attachments look very fine. The extra attachment to be exact has a name ATT00001.txt. :confused: This is not part of my $attach_list. BOUNDARY='------The Boundary-----' print - "From:... (1 Reply)
Discussion started by: pgop
1 Replies

7. AIX

Forwarding already received mail?

Greetings to all of you. I am a tad desperate here. I have found MANY articles scattered across the internet from google searches and unix.com searches for how to forward mail that say: Create a ~/.forward file and put XXXX in it. This is not what I need to do. We have bunch of users... (1 Reply)
Discussion started by: DennisC31
1 Replies

8. Shell Programming and Scripting

Checking the time of last file received?

Hi, Is there a way of looking at the last file received and checking whether it is more than 24 hours old? E.g. /Archive/Files/h/h0012345.dat I need to look in a directory, get the date of the processed file and make sure it wasn't more than a day ago. If it is more than 1 day ago I need... (9 Replies)
Discussion started by: rebootman
9 Replies

9. Post Here to Contact Site Administrators and Moderators

Received all post on my mail addess

Hi neo, I am a resistered member of Forum. I want to received all post which posted by all members via mail address. Can this possible to me??? Can i receive all posts?? Thanks Yogesh Goyal (0 Replies)
Discussion started by: yogesh goyal
0 Replies

10. UNIX for Dummies Questions & Answers

sorting received mail in unix and another error

hello! when issuing the mail command to see my received mail, i get this error: (server)starla:/home/starla>mail Warning: Too many letters, overflowing letters concatenated msgcnt 27378 vxfs: mesg 001: vx_nospace - /dev/vg00/lvol4 file system full (1 block extent) mail: no space for temp file... (0 Replies)
Discussion started by: starla0316
0 Replies
Login or Register to Ask a Question