Computer Tips - Linux: How can I list the mail I have without getting into the interactive

Date: 2009oct15 OS: Linux Q. Linux: How can I list the mail I have without getting into the interactive program? A. Do this command:
mail </dev/null
And you'll see the (first 20) headers of the your waiting mail. You can even do it on a web page:
#!/bin/sh echo "Content-Type: text/plain" echo mail -u MY_USER_ID </dev/null