Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / miscellany / scripts / append.sh
1 : append editor for mh -- /jlr and bd
2
3 case $# in
4 1)      msg=$1; echo -n 'Append file(s):  ' 1>&2; read appendix;;
5 2)      msg=$2; appendix=$1;;
6 *)      echo 1>&2 "Usage:  `basename $0` [file]"; exit 1;;
7 esac
8
9 for arg in $appendix
10 do
11         if [ -f $arg -a -r $arg ]       # exists; non-directory; readable
12         then
13                 echo 1>&2 \"$arg\"      # yell the file name out
14                 cat </dev/null $arg >>$msg
15         else
16                 echo 1>&2 "`basename $0` $arg:  Sorry."
17         fi
18 done