From 60cb01f9a81c311f914aed4a23e8e5b35e965918 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 11 May 2013 13:27:07 +0200 Subject: soem more cleanup Signed-off-by: Florian Pritz --- mailq-recipient | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 mailq-recipient (limited to 'mailq-recipient') 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##*/} " + 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 '*!' -- cgit v1.2.3-24-g4f1b