Mercurial > hg > Applications > mh
annotate miscellany/scripts/append.sh @ 17:76d91e545ea8 default tip
addrsbr and dtimep fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 Nov 2014 14:49:25 +0900 |
parents | bce86c4163a3 |
children |
rev | line source |
---|---|
0 | 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 |