Changeset 2411


Ignore:
Timestamp:
May 20, 2013, 2:15:39 AM (8 years ago)
Author:
adehnert
Message:
prune-mailq: only show the top twenty users
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/fedora/config/etc/scripts/prune-mailq

    r2410 r2411  
    1212clean_locker() {
    1313    echo "${1%%@scripts.mit.edu}"
     14}
     15
     16list() {
     17    echo "Top twenty users by number of queued messages:"
     18    mailq | tail -n +2 | grep -v '^ *(' | awk 'BEGIN { RS = "" } { print $8 }' | sort | uniq -c | sort -n | tail -n 20
    1419}
    1520
     
    8085shift
    8186case $op in
    82     list)
    83         mailq | tail -n +2 | grep -v '^ *(' | awk 'BEGIN { RS = "" } { print $8 }' | sort | uniq -c | sort -n
    84         ;;
     87    list) list;;
    8588    show-rand) show_rand;;
    8689    email) tmpl_email "$@";;
Note: See TracChangeset for help on using the changeset viewer.