This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff 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?