File:  [CSRG BSD Unix] / 43BSD / contrib / mh / miscellany / scripts / append.sh
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

: append editor for mh -- /jlr and bd

case $# in
1)	msg=$1; echo -n 'Append file(s):  ' 1>&2; read appendix;;
2)	msg=$2; appendix=$1;;
*)	echo 1>&2 "Usage:  `basename $0` [file]"; exit 1;;
esac

for arg in $appendix
do
	if [ -f $arg -a -r $arg ]	# exists; non-directory; readable
	then
		echo 1>&2 \"$arg\" 	# yell the file name out
		cat </dev/null $arg >>$msg
	else
		echo 1>&2 "`basename $0` $arg:  Sorry."
	fi
done

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.