sweh wrote:
Scripting 101
You need "" around $OGGI in the grep because OGGI has a space in it.
GREPOGGI=$(grep "$OGGI" ...)
However, grep | grep | grep is... umm.
Can't you just do
GREPOGGI=$(grep -c "^$OGGI .* $SENT")
thank you sweh.
I noticed that grepping on
Code:
SENT="smtp.*to=.*sent.*"
gives me a more "reliable" number.
I don't care about the email sent from dovecot, dovecot carry emails around my system internally, I don't want to count that.
I want to count only the email sent to the external and that grep helped me.