diff options
author | Rob Funk <rfunk@funknet.net> | 2004-06-08 03:59:01 +0000 |
---|---|---|
committer | Rob Funk <rfunk@funknet.net> | 2004-06-08 03:59:01 +0000 |
commit | d78b61e3efaea197a6e5b2b72bf2981a9ed69461 (patch) | |
tree | 1704e13ce5d767d59868a2d5e834cb2e988ed90f /contrib/gotmail.awk | |
parent | d9e84e176fe538e110d9612f9832d69846e8d3e7 (diff) | |
download | fetchmail-d78b61e3efaea197a6e5b2b72bf2981a9ed69461.tar.gz fetchmail-d78b61e3efaea197a6e5b2b72bf2981a9ed69461.tar.bz2 fetchmail-d78b61e3efaea197a6e5b2b72bf2981a9ed69461.zip |
Add files from ESR's dev directory that weren't under version control
svn path=/trunk/; revision=3881
Diffstat (limited to 'contrib/gotmail.awk')
-rw-r--r-- | contrib/gotmail.awk | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/contrib/gotmail.awk b/contrib/gotmail.awk new file mode 100644 index 00000000..9c967ade --- /dev/null +++ b/contrib/gotmail.awk @@ -0,0 +1,62 @@ +#----------------------------------------------------------------------------- +# +# Gotmail - gotmail.awk +# +# 1999 by Thomas Nesges <ThomasNesges@TNT-Computer.de> +# +#----------------------------------------------------------------------------- + +#----------------------------------------------------------------------------- +# This script is part of GotMail. It gives back normal text to the console +#----------------------------------------------------------------------------- + +{ + if($2!="reading") + { + if(($3=="message") || ($3=="messages")) + { + Mails = Mails sprintf(" %- 40s ",substr($5,1,40)) + Mails = Mails sprintf(" %- 5s ",substr($2,1,5)) + Mails = Mails sprintf(" %- 30s\n",substr($7,1,30)) + } + else if($3=="fetchmail") + { + Started = Started " " $0 "\n" + } + else + { + Errors = Errors $0 "\n" + } + } +} + +END { + Separator = "-------------------------------------------------------------------------------" + if(ENVIRON["GOTM_HED"]=="yes") + { + print "\n\t\t---------------------------------------" + print "\t\t| ** GotMail - Stats for fetchmail ** |" + print "\t\t---------------------------------------" + } + if(ENVIRON["GOTM_MSG"]=="yes") + { + print Separator + print "| Fetched Mails:" + print Separator + print Mails + } + if(ENVIRON["GOTM_ERR"]=="yes") + { + print Separator + print "| Error Messages:" + print Separator + print Errors + } + if(ENVIRON["GOTM_TIM"]=="yes") + { + print Separator + print "| Fetchmail started/stoped:" + print Separator + print Started + } + } |