Date: Wed, 23 Jul 2003 15:07:42 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: "Scott I. Remick" <scott@sremick.net> Cc: freebsd-questions@freebsd.org Subject: Re: search & replace on multiple files Message-ID: <20030723200741.GC3178@dan.emsphone.com> In-Reply-To: <1gf6uzxb9h9ir.1okxodxnyrkv2.dlg@40tude.net> References: <1gf6uzxb9h9ir.1okxodxnyrkv2.dlg@40tude.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jul 23), Scott I. Remick said: > Hello... I'm trying to figure out a way to pull off the following: > > I have a subdir with many different sorts of text files (some nested in > additional subdirs, so recursion would be necessary) that need to have a > search & replace done on them. What's a quick way to script a global search > & replace on many/all text files in nested subirs? find . -type f | xargs sed -i.bak "s/oldtext/newtext/g" -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030723200741.GC3178>
