Subdomain Posts
Bash | 15 hours ago
Bash | 1 day ago
Bash | 4 days ago
Bash | 4 days ago
Bash | 9 days ago
None | 10 days ago
Bash | 14 days ago
Bash | 14 days ago
Bash | 14 days ago
Bash | 14 days ago
Recent Posts
JavaScript | 21 sec ago
PHP | 1 min ago
None | 2 min ago
mIRC | 2 min ago
Perl | 3 min ago
C++ | 3 min ago
None | 3 min ago
C | 4 min ago
mIRC | 4 min ago
None | 6 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Anonymous on the 31st of Jan 2010 12:20:18 PM Download | Raw | Embed | Report
  1.  
  2.  Script
  3.  
  4.  
  5. #!/bin/bash
  6.  
  7. while [ 0 == 0 ]
  8. do
  9.  
  10. LIST="`ls -t /var/mail/root`"
  11. ISZ=0
  12.  
  13. for mail in $list
  14. do
  15.         ISZ=`expr $isz + 1`
  16. done
  17.  
  18. echo "Il y a $isz mail(s) non lu(s) dans votre boîte de réception"
  19. echo "Tapez le numéro de celui à lire"
  20. read chiffre
  21.  
  22. ISZ2=0
  23. for mail in $list
  24. do
  25.         ISZ2=`expr $isz2 + 1`
  26.         if [ "$isz2" == "$chiffre" ]; then
  27.                 echo Appuyez sur Q pour quitter la page
  28.                 echo Appuyez maintenant sur Entrée pour afficher le mail
  29.                 sleep 1
  30.                 read null
  31.                 less "/var/mail/root/$mail"
  32.                 clear
  33.                 echo [1] Supprimer le mail
  34.                 echo [*] Archiver le mail dans /var/mail/rootarchive/
  35.                 read -n 1 quoifaire
  36.                 if [ "$quoifaire" == "1" ]; then
  37.                         rm /var/mail/root/$mail
  38.                         echo Mail supprimé.
  39.                 else
  40.                         mv /var/mail/root/$mail /var/mail/rootarchive/$RANDOM.$mail
  41.                         echo Mail archivé.
  42.                 fi
  43.         fi
  44. done
  45.  
  46. echo [Q] Quitter le programme
  47. echo [*] Lire un autre mail
  48. read -n 1 restart
  49. if [ "$restart" == "Q" ]; then
  50. echo "\n"
  51. exit 0
  52. fi
  53. if [ "$restart" == "q" ]; then
  54. echo "\n"
  55. exit 0
  56. fi
  57. echo "\n"
  58. done
  59.  
  60.  
  61.  Sortie
  62.  
  63.  
  64. [root@shellgratuit:~]# ./readmail.sh
  65. Il y a  mail(s) non lu(s) dans votre boîte de réception
  66. Tapez le numéro de celui à lire
  67. 1
  68. [Q] Quitter le programme
  69. [*] Lire un autre mail
  70. q\n
Submit a correction or amendment below. [ previous version ] | [ difference ] | Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: