Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!sharkey!itivax!lokkur!scs From: scs@lokkur.UUCP (Steve Simmons) Newsgroups: comp.mail.elm Subject: Re: readmsg bug Summary: Shell scripts, independant systems Message-ID: <1443@lokkur.UUCP> Date: 11 May 89 00:03:31 GMT References: <25537@amdcad.AMD.COM> Reply-To: scs@lokkur.dexter.mi.us (Steve Simmons) Organization: Inland Sea Software, Ltd. Lines: 27 In article jv@mh.nl (Johan Vromans) writes: >What is the need for the "readmsg" program? It looks to me that it is >lots of overhead to use an external tool to extract messages from the >mailboxes. Each time it has to scan the whole file, parsing headers, >counting messages, copying them etc etc ... And it's error-prone: no >continuation-header lines, user-specified weedout list is not obeyed. >All information needed is present in Elm the moment it's needed. True, but this is a case of different tools for different purposes. For example, if one wishes to split a mailbox into separate individual files one can do: messages > /dev/null 2>&1 MSG_COUNT=$? COUNT=1 while [ $COUNT -le $MSG_COUNT ] ; do readmsg $COUNT > mbox.sub.$COUNT COUNT=`expr $COUNT + 1` done Very useful when faced with mailboxes bigger than your /tmp space! Better yet, pipe the output off to some other program that doesn't know how to break up messages. -- Steve Simmons ...sharkey!lokkur!scs scs@lokkur.dexter.mi.us "Gordon Way's astonishment at suddenly being shot dead was nothing to his astonishment at what happened next." -- Douglas Adams