Forum Moderators: bakedjake

Message Too Old, No Replies

Change Copyright and Year

Using Unix command or script

         

ncw164x

9:33 am on Dec 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How can you change the following copyright and year
Copyright © 2003
to
Copyright © 2004
----------------------------

Copyright © 2000 - 2003
to
Copyright © 2000 - 2004
----------------------------

© Copyright 1999/2003
to
© Copyright 1999/2004
---------------------------

Copyright ©
to
Copyright © 2004

Thanks for any help

ncw164x

dmorison

9:39 am on Dec 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try:

man replace

to see if replace is on your system. Comes with mysql (but there may be other versions in the wild). Simple command line utility to search and replace within files.

ncw164x

10:19 am on Dec 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



man replace is installed on the server but relates to mysql2mysql

Can this be used to replace the year on html pages

ncw164x

dmorison

12:12 pm on Dec 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The command itself is just replace. The *nix man command just shows the built in documentation for whatever command name you pass to it.

replace will do what you want; but make sure that you BACKUP EVERYTHING FIRST!

I would create a test file first; call it test.html; containing "Copyright © 2003" somewhere; and then practice using the replace command; for example:

replace "Copyright © 2003" "Copyright © 2004" test.html

I would imagine that you can use a wildcard for the filename; so when you're ready to do it for real use *.html.

Be careful.

If you're not sure what you're doing at the shell prompt I would recommend that you FTP the files off to another computer; and use a text editor with a replace in files feature (such as UltraEdit).

ncw164x

12:27 pm on Dec 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I normally change all the files on my hard drive with find and replace and then ftp the changes to the server but over the years the amount of pages have grown and the amount of sites as well.

I am all for keeping it simple and as you say back it up first just in case, I was hoping for a simple script or process to carry this out but I will do it the same way as always which is the safer option.

Thanks for your reply

ncw164x

uncle_bob

1:06 pm on Dec 30, 2003 (gmt 0)

10+ Year Member



I put the copyright statement in a small site specific include file, that every page on the site #includes. It also contains the name of the site banner etc, so your can make your change in just one place, and it occurs everywhere.