home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / listserv5.31 / part01 / redux < prev    next >
Encoding:
Text File  |  1991-12-12  |  494 b   |  17 lines

  1. #!/bin/sh
  2. # Script to reduce the size of mboxes by removing unnecessary fields in
  3. # the header of each message.
  4. # Usage: redux [mbox-file] (default is ./mbox)
  5.  
  6. FILE=$1
  7. if [ $# = 0 ]; then
  8.   FILE=./mbox
  9. fi
  10. if [ ! -r $FILE ]; then
  11.   echo File $FILE not found.
  12.   exit
  13. fi
  14. echo Reducing $FILE\; reduced file in /tmp/reduced >&2
  15. /usr/bin/egrep -v "^Cc: |^          with BSMTP;|^Received: |^Status: |^Message-Id: |^Comment: |^Reply-To: |^Sender: |^To: |^Return-Path: |^    id " $FILE > /tmp/reduced
  16. exit
  17.