"Stephen J. Turnbull" <stephen(a)xemacs.org> wrote:
Patches to update individual files are also welcome from anybody
(every file with a permissions notice refers users to the FSF to get
copies of the GPL, just in case). No need to fix them all, although
the more the merrier.
It would be a piece of cake to whip up a script to fix them all at once.
It would touch a very large number of files, though. In fact, I still
have a script I wrote way back in my youth that might do the job with
very little modification. I wrote this in grad school when I had to do
a search-and-replace job across a large directory tree:
#! /bin/sh
#
# Usage: replace text1 text2
# Replace all occurrences of 'text1' with 'text2' in every file
# given on standard input. For example, to replace all
# occurrences of 'foo' with 'bar' in files whose names end in
# .txt, issue the following command:
#
# find . -name \*.txt | replace foo bar
while read i; do
sed "s|$1|$2|g" $i > $i.tmp && mv -f $i.tmp $i
done
What do you say? Should I just change them all and get it over with?
--
Jerry James, Assistant Professor james(a)xemacs.org
Computer Science Department
http://www.cs.usu.edu/~jerry/
Utah State University