diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-05-11 13:27:07 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-05-11 13:27:07 +0200 |
commit | 60cb01f9a81c311f914aed4a23e8e5b35e965918 (patch) | |
tree | 8b9109a8f1bcf37506755e0e77b83b0a026cda57 /mailq-recipient | |
parent | a9ba01279e6f3c64b082f4de6e7d95cd1b5f7dab (diff) | |
download | bin-60cb01f9a81c311f914aed4a23e8e5b35e965918.tar.gz bin-60cb01f9a81c311f914aed4a23e8e5b35e965918.tar.xz |
soem more cleanup
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'mailq-recipient')
-rwxr-xr-x | mailq-recipient | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mailq-recipient b/mailq-recipient new file mode 100755 index 0000000..91dc13e --- /dev/null +++ b/mailq-recipient @@ -0,0 +1,12 @@ +#!/bin/bash + +if [[ -z $1 ]]; then + echo "Usage: ${0##*/} <recipient>" + exit +fi + +mailq | tail -n +2 | grep -v '^ *(' | awk 'BEGIN { RS = "" } + # $7=sender, $8=recipient1, $9=recipient2 + { if ($8 == "'$1'" && $9 == "") + print $1 } + ' | tr -d '*!' |