home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume23
/
trn
/
part13
/
mbox.saver.SH
< prev
next >
Wrap
Text File
|
1991-08-22
|
2KB
|
72 lines
case $CONFIG in
'') . ./config.sh ;;
esac
echo "Extracting mbox.saver (with variable substitutions)"
$spitshell >mbox.saver <<!GROK!THIS!
$startsh
# $Header: mbox.saver.SH,v 4.3.3.1 90/08/20 16:30:28 davison Trn $
#
# $Log: mbox.saver.SH,v $
# Revision 4.3.3.1 90/08/20 16:30:28 davison
# Added support for MMDF format mailboxes.
#
# Revision 4.3.2.3 90/11/22 14:28:27 sob
# Changed . config.sh to . ./config.sh
#
# Revision 4.3.2.2 90/03/17 20:44:54 sob
# Modify Article header to place the colon after Article.
#
# Revision 4.3.2.1 89/11/28 00:05:47 sob
# Branch for RN/RRN combo patches
#
# Revision 4.3.1.2 85/05/20 15:55:37 lwall
# Turned $5 into \$5.
#
# Revision 4.3.1.1 85/05/10 11:35:30 lwall
# Branch for patches.
#
# Revision 4.3 85/05/01 11:42:51 lwall
# Baseline for release with 4.3bsd.
#
#
# Arguments:
# 1 Full name of article (%A)
# 2 Public news spool directory (%P)
# 3 Directory of current newsgroup (%c)
# 4 Article number (%a)
# 5 Where in article to start (%B)
# 6 Newsgroup name (%C)
# 7 Save destination (%b)
# 8 First line of message, normally From...
#
export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
!GROK!THIS!
case $mboxchar in
"$CTRLA")
$spitshell >>mbox.saver <<!GROK!THIS!
( $echo "$CTRLA$CTRLA$CTRLA$CTRLA"
if $test "\$5" = 0 -a ! "\$4" = 0 ; then
$echo "Article: \$4 of \$6"
fi
$tail +\$5c \$1
$echo ""
$echo ""
$echo "$CTRLA$CTRLA$CTRLA$CTRLA" ) >> \$7
!GROK!THIS!
;;
*)
$spitshell >>mbox.saver <<!GROK!THIS!
( $echo "\$8"
if $test "\$5" = 0 -a ! "\$4" = 0 ; then
$echo "Article: \$4 of \$6"
fi
$tail +\$5c \$1 | $sed "s/^From />From /"
$echo ""
$echo "" ) >> \$7
!GROK!THIS!
;;
esac
$eunicefix mbox.saver
chmod 755 mbox.saver