On 3 Aug, David W. Tamkin wrote:
| [...]
| By the way, piping ls -l to a read loop or to gawk to get the current size
| of the mailspool is not a great way to do it.
|
| BOXSIZE=`wc -c < $ORGMAIL`
|
| is a lot more efficient. (Yes, folks, wc can read from a file named on its
| command line as well as from stdin, but then it prints the filename on
| stdout; when it reads from stdin, it doesn't print a filename.)
Damn! Knowing there *must* be a better way, I racked my brain (limited
as it is, that only took about 30 seconds) and couldn't come with
anything. When I mentioned others picking up the pieces, David was at
the top of my mental list. As usual he didn't dissapoint. I guess I can
now rework my shell function that includes this line:
eval _$_fstat=`perl -e'print((stat$ENV{_file})[7])'`
;-)
--
/"\
Don Hammond \ / ASCII Ribbon Campaign
Raleigh, NC US X Against HTML Mail,
/ \ and News Too
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail