wisdom@CS.UWindsor.Ca (CSS Newsletter) (01/22/91)
A simple query; what am I doing wrong? All I really want to be able to do (for example) is: cd /usr/spool/news/comp/mail/elm cat * >~/Mail/cm-elm elm -f =cm-elm And read Usenet groups THAT way! Sort by subject, and **poof**, who NEEDS trn! Unfortunately, when I do this, I get Folder is corrupt!! I can't read it!! However, if I (using Vnews) extract msgs out, then cat them together, every- thing works just fine. The only difference I can find is that, the msgs that DO work in folders, start with a FROM line, with no colon, but with the date appended to the line. So my simple question, to those of you with more awk and related skills out there is HOW? How do I stick this line in to the beginning of each msg? Or is there some OTHER way of getting around it? Am I gonna hafta write a C program to add one lousy line to every message and build the folder? (That's within my abilities; an AWK script/one-liner isn't). No, Perl isn't up and running here either. -- Pete Smith
chris@vision.UUCP (Chris Davies) (01/26/91)
In article <339@schoenfinkel.CS.UWindsor.Ca> wisdom@CS.UWindsor.Ca (CSS Newsletter) writes: >All I really want to be able to do (for example) is: > cd /usr/spool/news/comp/mail/elm > cat * >~/Mail/cm-elm > elm -f =cm-elm >And read Usenet groups THAT way! [...] I would consider piping each message into rmail (/bin/rmail on this SysV.3 machine). You would then need some way of persuading mail to drop such messages into your required folder. If "filter" can tell that a particular header exists you could look for the "Path: ..." line. Try this (bourne) shell script for starters (don't forget to change "chris" to your own username :-) ... : cd /usr/spool/news/comp/mail/elm for f in * do cat $f | rmail chris done Chris -- VISIONWARE LTD | UK: chris@vision.uucp JANET: chris%vision.uucp@ukc 57 Cardigan Lane | US: chris@vware.mn.org BANGNET: ...!ukc!vision!chris LEEDS LS4 2LE, England | VOICE: +44 532 788858 FAX: +44 532 304676 -------------- "VisionWare: The home of DOS/UNIX/X integration" -------------
bhoule@se-sd.SanDiego.NCR.COM (Bill Houle) (01/29/91)
In article <339@schoenfinkel.CS.UWindsor.Ca> wisdom@CS.UWindsor.Ca (CSS Newsletter) writes: >All I really want to be able to do (for example) is: > cd /usr/spool/news/comp/mail/elm > cat * >~/Mail/cm-elm > elm -f =cm-elm >And read Usenet groups THAT way! [...] In <1398@vision.UUCP> chris@vision.UUCP (Chris Davies) writes: >I would consider piping each message into rmail (/bin/rmail on this SysV.3 >machine). You would then need some way of persuading mail to drop such >messages into your required folder. Or something like the following could be done: for f in * do news-to-mail $f ~/Mail/cm-elm done where 'news-to-mail' is a script like so: #!/bin/sh # # $1 == news article # $2 == mail folder # ex - $1 >/dev/null << E*O*F /^Date: ya ?^Path: pu - j g/^Path:/s/Date: //g g/^Path:/s//From/g w! >> $2 q E*O*F The only reason to do it this way would be if rmail is a hog as compared to ex or sed or whatever header mangler is used. Note that the date will come out screwy under Elm; this is because the Date header in news is "day month yr" and mail uses "dow month day year". Small price to pay. -- Bill Houle bhoule@se-sd.SanDiego.NCR.COM NCR NPD-San Diego (619) 693-5593