Code.GeekInterview.com
 
Code Samples UNIX
 

Mail Checker


Code ResourceAuthor: GregMark  

Difficulty Level:

Published: 24th May 2007   Read: 2777 times  

Filed in: UNIX
Add Comment


 

 

Sponsored Links


 

 

This shell script is written in Bourne Shell. This script checks for new mail message every one hour and displays to user appropriate message about arrival of new mail. To execute the Bourne-shell script named as checker.sh in you UNIX operating system in Bourne shell prompt type sh checker.sh and press enter.

 


Sample Code
  1.  
  2. # The script is a mail checker which checks for new mail message every one hour and displays  relevant message about arrival of new mail to user
  3. #!/bin/sh
  4. while true
  5. do
  6. if mail -e
  7. then
  8. echo "New Mail Has Arrived!!!!"
  9. else
  10. echo "You have No New Mail"
  11. fi
  12. sleep 3600
  13. done &
  14.  
Copyright GeekInterview.com


Next: UNIX Shell Program To Find Palindrome


 

Latest Code Samples

 

Popular Code Samples

 

Related Code Samples

 

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    



Popular Coders

# Coder NameHits
1. mano.mithun5745
2. christia3371
3. GregMark2778

Active Coders

# Coder NameCodes
1. GregMark1
2. christia1
3. mano.mithun1

Refined Tags