Path: utzoo!utgpu!water!watmath!mks!tj
From: tj@mks.UUCP (T. J. Thompson)
Newsgroups: comp.sys.ibm.pc
Subject: Re: UTILITY TO PUT FILENAME AT TOP OF FILE
Summary: utility to put filename at top of file
Keywords: filenames sh ed
Message-ID: <486@mks.UUCP>
Date: 8 Jul 88 23:25:53 GMT
References: <1045@marlin.NOSC.MIL>
Organization: Mortice Kern Systems, Waterloo, Ont.
Lines: 25

In article <1045@marlin.NOSC.MIL>, farris@marlin.NOSC.MIL (Russell H. Farris) writes:
> 
> Can anyone direct me to a utility that reads the name of an MSDOS
> file and then inserts the name at the top of the file?  Thanks,
> 
#
# Shell script to put file name on first line of each argument file
for f in "$@"
do
	ed - "$f" <<-!
	0a
	$f
	.
	w
	q
done


Shell?? you say? ed??? MKS Toolkit is the answer.
Wasn't that easy?
-- 
     ll  // // ,'/~~\'   T. J. Thompson              uunet!watmath!mks!tj
    /ll/// //l' `\\\     Mortice Kern Systems Inc.         (519) 884-2251
   / l //_// ll\___/     35 King St. N., Waterloo, Ont., Can. N2J 2W9
O_/                                long time(); /* know C */