Article View: news.software.readers
Article #1427Re: How to save specific header line with 'rn' ?
From: Sridhar Venkataraman
Date: Tue, 07 Apr 1992 18:23
Date: Tue, 07 Apr 1992 18:23
55 lines
2943 bytes
2943 bytes
jik@athena.mit.edu (Jonathan I. Kamens) writes on news.software.readers:
) I am new to the 'rn' program and find it very interesting. I have checked
) the manual for 'rn' (man rn) and could not solve my problem.
) I would like to be able to save some news without including all the
) header lines (i.e. just to include: Date, From and Subject).
)
)See the rn man page to find out how to use different mbox.saver and
)norm.saver scripts.
)
) I know that I can just type in: s in 'rn' to save an article or a range of
) articles, but I don't know how I can "customize" 'rn' to omit other header
) lines when saving.
)
)Rn saves articles with the same header lines it displays on-screen.
)You could actually use the '&' command to hide the headers you don't
)want and then save the article, but that's quite cumbersome,
)especially since you'll have to undo your settings if you keep on
)reding news.
I am not sure rn does this. I have restricted my header lines to just
3 of them but saving them always saves the entire headers.
Since rn does a byte-count determination for the 'w'
command (which is not so obvious to many readers who have read TFM),
it is especially useful in discarding unwanted headers.
Since I prefer mbox format in saving, I hereby give a patch for
mbox.saver which will let the user save articles with preferred
headers. (Use 'w' instead of 's')
*** mbox.saver Tue Apr 7 09:51:22 1992
--- oldmbox.saver Sat Feb 1 15:01:44 1992
***************
*** 33,35 ****
( echo "$8"
! sed -n '1,/^$/p' $1 | egrep "^From:|^Subject:|^Newsgroups:"
tail +$5c $1 | sed "s/^From />From /"
--- 33,37 ----
( echo "$8"
! if /bin/test "$5" = 0 -a ! "$4" = 0 ; then
! echo "Article: $4 of $6"
! fi
tail +$5c $1 | sed "s/^From />From /"
The user's customizability may vary. Any other suggestions for this welcome.
Let me caution that use of 's' command with this script is not
recommended.
)Jonathan Kamens jik@MIT.Edu
Sridhar.
Technical Details
Message-ID:
<1992Apr7.182358.632@ennews.eas.asu.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!ukma!asuvax!ennews!enuxhb.eas.asu.edu!sridharReferences:
<1992Apr6.213356.7296@ccu.umanitoba.ca> <JIK.92Apr7104517@pit-manager.mit.edu>Show Full Headers
Complete Article Headers
Message-ID: <1992Apr7.182358.632@ennews.eas.asu.edu> Subject: Re: How to save specific header line with 'rn' ? Date: Tue, 07 Apr 1992 18:23:58 +0000 From: sridhar@enuxhb.eas.asu.edu (Sridhar Venkataraman) References: <1992Apr6.213356.7296@ccu.umanitoba.ca> <JIK.92Apr7104517@pit-manager.mit.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!ukma!asuvax!ennews!enuxhb.eas.asu.edu!sridhar Newsgroups: news.software.readers Sender: news@ennews.eas.asu.edu (USENET News System) Reply-To: sridhar@enuxha.eas.asu.edu (Sridhar Venkataraman) Followup-To: news.software.readers Organization: Arizona State University, Tempe AZ Lines: 55