![]() |
mhonarc-users
|
Re: automated message removing1996-10-07 13:47:36Jussi Kallioniemi said: [...] Grepping and parsing the msgnum to the right format ofcourse does it, but.. I should only grep the zeros before anything else and not grep msgnum 00000. Ehh. Has anyone else had the same kinda problem? Yeah. Here's the magic :-) o09(0) ~ > perl -e '$num="0000000"; $num=~s/^0*(\d+)/\1/; print "$num\n"' 0 o09(0) ~ > perl -e '$num="0000042"; $num=~s/^0*(\d+)/\1/; print "$num\n"' 42 Achim -- Jussi Kallioniemi jukal(_at_)infosto(_dot_)fi
|
|