>> Is there an easy way to append a small file, tmp1, to a bunch of files
>> all at once? This doesn't work:
>> /bin/ls -1 *.vsr | xargs cat tmp1 >>
>> I think the shell is intercepting the >>, and enclosing the last 3
>> items in single quotes doesn't work either.
> ">>" is a shell operator, not a xargs operator.
> Here, you want
> tee -a ./*.vsr < tmp1 > /dev/null
Good one! I keep forgetting that tee can take multiple filenames.
> for f in *.vsr; do cat tmp1 >> "$f"; done
There's no need to call cat for every file; just store the file in
a variable first with "tmp1=`cat tmp1`", then echo it to each file.
Chris F.A. Johnson http://cfaj.freeshell.org
My code (if any) in this post is copyright 2003, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License