|
|||||||||||
|
Re: [gentoo-user] [OT]batch processing html files
From: Etaoin Shrdlu <shrdlu(at)unlimitedmail.org>
Date: Wed Apr 30 2008 - 12:04:23 EDT
> I have a folder full of .html files and I need to go through and If all the files are in the same directory, you can do
cd /your/directory
The -i flag tells sed to edit the file "in place", ie, the changes are made to the file itself (of course, sed does create a temporary file behind the scenes, but that is handled by sed). To stay on the safe side, I suggest specifying a suffix to -i, so that sed creates backup copies of the files, eg sed -i BAK etc. will create a backup file called "$f.BAK" when modifying "$f". When you're sure the changes are correct, you can of course delete all the BAK files. Otherwise, use them to restore the original files and start over. Hope this helps. -- gentoo-user@lists.gentoo.org mailing listReceived on Wed Apr 30 12:11:16 2008 This archive was generated by hypermail 2.1.8 : Sat Aug 02 2008 - 05:07:08 EDT |
||||||||||
|
|||||||||||