Web page hosting and cheap domain registration & search engine ranking services
  

 

The storeparts Shell Script

[return-to Explanation of storeparts] [table of contents] [index]

#! /bin/sh
# $Id: storeparts,v 1.0 1995/07/12 14:37:22 jerry book3 $
#
### storeparts - find all parts of current message/partial and store them
### Usage: storeparts [msgs]
##
##  storeparts gets the "id=" field from the Content-Type: header
##  field of the current message.  Then it searches for other parts
##  with the same id= string and gives the messages to 'mhn -store'.
##
##  msgs is the list of messages in the current folder to search for
##  other parts.  The default is all messages.

# GET "id=" STRING FROM CURRENT MESSAGE:
ctype=`scan -format '%{content-type}' cur` || exit
id=`expr "$ctype" : '.*\(id="[^"]*"\)'` || exit
echo "`basename $0`: searching for '$id'." 1>&2
# FIND MESSAGES IN $1 (DEFAULT: ALL MESSAGES) WITH $id IN "Content-Type:".
# STORE IN temp SEQUENCE:
pick --content-type "$id" -seq temp $1 || exit
# IF pick DIDN'T FIND ALL MESSAGES, mhn WILL COMPLAIN AND QUIT:
mhn -store temp
 

 

 

 
 

Disclaimers: This document is provided as free service for the benefits of Active-Venture.com's web hosting customers only.

 
Quotes: