home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / armlinux / alpha / PARTITIONS / USR_GZ / usr / lib / trn / mbox.saver < prev    next >
Encoding:
Text File  |  1995-05-14  |  1.2 KB  |  35 lines

  1. #!/bin/sh
  2. # $Id: mbox.saver.SH,v 3.0 1991/09/09 20:23:31 davison Trn $
  3. # This software is Copyright 1991 by Stan Barber. 
  4. #
  5. # Permission is hereby granted to copy, reproduce, redistribute or otherwise
  6. # use this software as long as: there is no monetary profit gained
  7. # specifically from the use or reproduction of this software, it is not
  8. # sold, rented, traded or otherwise marketed, and this copyright notice is
  9. # included prominently in any copy made. 
  10. #
  11. # The author make no claims as to the fitness or correctness of this software
  12. # for any use whatsoever, and it is provided as is. Any use of this software
  13. # is at the user's own risk. 
  14. #    Arguments:
  15. #    1 Full name of article (%A)
  16. #    2 Public news spool directory (%P)
  17. #    3 Directory of current newsgroup (%c)
  18. #    4 Article number (%a)
  19. #    5 Where in article to start (%B)
  20. #    6 Newsgroup name (%C)
  21. #    7 Save destination (%b)
  22. #    8 First line of message, normally From...
  23. #
  24. export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0; kill $$)
  25.  
  26.  ( /bin/echo "$8"
  27.   if test "$5" = 0 -a ! "$4" = 0 ; then
  28.     /bin/echo "Article: $4 of $6"
  29.   fi
  30.   /usr/bin/tail +$5c $1 | /usr/bin/sed "s/^[Ff]rom />& /"
  31.   /bin/echo ""
  32.   /bin/echo "" ) >> $7
  33.