Joseph Wetstein asked,
| I saw someone's autoreplier that gave a running count of the number of
| messages ahead of the one that was just sent... i.e. "thank you for your
| message. I'll get to it as soon as I can. There are 5 messages ahead of
| you in the queue"
|
| How do I do that?
If your inbox is a plain folder,
ALREADY_THERE=`grep -c '^From ' $DEFAULT`
will give the number (or one slightly too high).
If your inbox is a directory, you'll need two processes. This is one way:
ALREADY_THERE=`ksh -c 'echo $DEFAULT/!(*.lock) | wc -w'`