Date: Mon, 14 Feb 2011 14:58:29 -0800 From: Chip Camden <sterling@camdensoftware.com> To: freebsd-questions@freebsd.org Subject: Re: script help Message-ID: <20110214225829.GF2714@libertas.local.camdensoftware.com> In-Reply-To: <3.0.1.32.20110214163437.019167e0@sage-american.com> References: <3.0.1.32.20110214163437.019167e0@sage-american.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--ChQOR20MqfxkMJg9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoth Jack L. Stone on Monday, 14 February 2011: > Hello folks: >=20 > No doubt this will be easy for those with scritping abilities. >=20 > I have a gazillion files by the same name and each contains the same line > requiring the same change. But the problem is that they are in many > different directories on a server with numerous domains. While I could > handle the change using a single directory within my abilities, I'm unsure > how to do a search and replace throughout the many domains and their > directories. Don't want to mess up. Here's what I'm trying to do: >=20 > # find all of the same filenames (copyright.htm) and then replace the year > 2010 with 2011 in each file. Once I have a working script, I should be ab= le > to add it as a cron job to run on the first day of each new year. >=20 > Any help appreciated. >=20 > Thanks! > Jack >=20 > (^_^) > Happy trails, > Jack L. Stone >=20 > System Admin > Sage-american > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" find /upper-dir -name copyright.htm -exec sed -i '' -e "s/2010/2011/g" {} \; --=20 Sterling (Chip) Camden | sterling@camdensoftware.com | 2048D/3A978E4F http://chipsquips.com | http://camdensoftware.com | http://chipstips.com --ChQOR20MqfxkMJg9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQEcBAEBAgAGBQJNWbOVAAoJEIpckszW26+R278H/0cXBFJ6eWmbiYzWmcJ4SIMt UGCY3z/NoyA69dgNA/RrgQ6H2oj+YuwtoNfIdoyP/QV/cuWbpZ1583X+C1W4JS6A sVAfbW+p+jX+6sSZaYLG7PKX0lsAc/b9h+6gPkMXQAcVT9eXKlyrZGI6Ho/uK2sC KO3unf8th/mnNoDYxPcbFQGVu7OVzSvB1HXMZrvX8CwsLDQSsJ+1y0/XSkLWmDyL xsq3z5X1jA3PPumeMsRnGVHFrpe7Jf1xwLs8LBOPU8ioHgfzJLpG2bk25p6uXCpJ uycIMCxPwlNIf0U4yoZpQwH536aJRVz9qrXYwIWZX3PoScsKaQhkSwBZDwn9LVc= =mOq7 -----END PGP SIGNATURE----- --ChQOR20MqfxkMJg9--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110214225829.GF2714>