if you already use awk try to use only one awk script instead of this chain of tail|grep|awk|tr.
Also would be nice to copy the output of mailq before processing and describe the result you want to get
__________________________________
Happy with solution ... mark as SOLVED
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
|