Ignore:
Timestamp:
May 18, 2013, 5:02:49 PM (12 years ago)
Author:
adehnert
Message:
prune-mailq: fix usage and allow @scripts.mit.edu names
File:
1 edited

Legend:

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

    r2409 r2410  
    66usage="Usage:
    77    $0 list
    8     $0 show-rand"
     8    $0 show-rand
     9    $0 email lockers...
     10    $0 purge lockers..."
     11
     12clean_locker() {
     13    echo "${1%%@scripts.mit.edu}"
     14}
    915
    1016show_rand() {
     
    2430    fi
    2531    for locker in "$@"; do
     32        locker=$(clean_locker "$locker")
    2633        echo "fs la /mit/$locker/"
    2734        fs la "/mit/$locker"
     
    6370    fi
    6471    for locker in "$@"; do
     72        locker=$(clean_locker "$locker")
    6573        echo "$locker..."
    6674        mailq | tail -n +2 | grep -v '^ *(' | awk "BEGIN { RS = \"\" } (\$8 == \"$locker@scripts.mit.edu\" && \$9 == \"\") { print \$1 }" | tr -d '*!' | postsuper -d -
Note: See TracChangeset for help on using the changeset viewer.