#!/bin/sh # # batch-email (c) Copyright Bunyip Information Systems, Inc. 1994 # # This routine can be used to batch incoming email requests for later # processing # PATH=/bin:/usr/bin:/usr/local/bin if p=$(getent passwd archie) ; then archiehome=$(echo "$p" | awk -F: '{print $6}') else echo "Cannot find home directory for user archie" >&2; exit 1 fi ch_tmp() { cd $archiehome/db/tmp } usage() { echo "Usage: batch-email -t " exit 1 } tdir="notset" while [ $# -gt 1 ] ; do case $1 in #temp directory -t) if [ $# -gt 1 ] ; then shift ; tdir=$1; else usage; fi;; esac shift done if [ $tdir = "notset" ]; then ch_tmp else cd $tdir fi cat > aremail.`date +%y.%T`.$$