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...
By Anonymous on the 31st of Jan 2010 12:20:18 PM
Download |
Raw |
Embed |
Report
Script
#!/bin/bash
while [ 0 == 0 ]
do
LIST="`ls -t /var/mail/root`"
ISZ=0
for mail in $list
do
ISZ=`expr $isz + 1`
done
echo "Il y a $isz mail(s) non lu(s) dans votre boîte de réception"
echo "Tapez le numéro de celui à lire"
read chiffre
ISZ2=0
for mail in $list
do
ISZ2=`expr $isz2 + 1`
if [ "$isz2" == "$chiffre" ]; then
echo Appuyez sur Q pour quitter la page
echo Appuyez maintenant sur Entrée pour afficher le mail
sleep 1
read null
less "/var/mail/root/$mail"
clear
echo [1] Supprimer le mail
echo [*] Archiver le mail dans /var/mail/rootarchive/
read -n 1 quoifaire
if [ "$quoifaire" == "1" ]; then
rm /var/mail/root/$mail
echo Mail supprimé.
else
mv /var/mail/root/$mail /var/mail/rootarchive/$RANDOM.$mail
echo Mail archivé.
fi
fi
done
echo [Q] Quitter le programme
echo [*] Lire un autre mail
read -n 1 restart
if [ "$restart" == "Q" ]; then
echo "\n"
exit 0
fi
if [ "$restart" == "q" ]; then
echo "\n"
exit 0
fi
echo "\n"
done
Sortie
[root@shellgratuit:~]# ./readmail.sh
Il y a mail(s) non lu(s) dans votre boîte de réception
Tapez le numéro de celui à lire
1
[Q] Quitter le programme
[*] Lire un autre mail
q\n
Submit a correction or amendment below.
[ previous version ] | [ difference ] | Make A New Post