Code.GeekInterview.com
  I am new, Sign me up!
 
Code Samples UNIX
 

Mail Checker


Code ResourceAuthor: GregMark  

Difficulty Level:

Published: 24th May 2007   Read: 1045 times  

Filed in: UNIX
Add Comment


 


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: File Retriever


 

Latest Code Samples

 

Popular Code Samples

 

Related Code Samples

 

Post Comment


Members Please Login

Name:  Email: (Optional. Used for Notification)

Title:
 
Comment:
Validation Code: <=>  (Enter this code in text box)





Popular Coders

# Coder NameHits
1. christia1237
2. GregMark1046

Active Coders

# Coder NameCodes
1. GregMark1
2. christia1

Refined Tags

 

Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact  

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape