This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I would like to write a unix script using which I need to read all emails (using 'mail' command) and redirect each email to a separate file. I am facing challenges in passing options like 'n' (to go to next message), 'q' (to quit), 'd' (to delete a message) etc to 'mail' command within a script. Is there any ready made script available to handle these kind of interactive commands?