ORIGINALLY POSTED BY OPUS FOR THETAZZONE/TAZFORUM HERE

Do not use, republish, in whole or in part, without the consent of the Author. TheTAZZone policy is that Authors retain the rights to the work they submit and/or post…we do not sell, publish, transmit, or have the right to give permission for such…TheTAZZone merely retains the right to use, retain, and publish submitted work within it’s Network

I wrote some code a few years back, basically it was channel services for IRC. It has about 96 .c files that are compiled into a single binary. Each file contains copyright info at the top, so rather than edit each file one at a time to modify the copyright each year, I wrote a script to do it for me.

Code:
#!/bin/sh
for x in *.c
do
echo $x
ed -s $x << end
g/some string/s//to some other string/g
w
q
end
done

Of course you can modify it to suit your need to edit other type files. The key being each file contains “some string”

By admin

Former Freehand Freelance Graphic Illustrator... been online since 2004 ( late starter ), blogging since 2005, presently writing a suspense-thriller e-book that began as a screenplay.

Leave a Reply

Your email address will not be published. Required fields are marked *