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?

can you please explain it further with an example ?

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:

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

tyler_durden