On 16:18 23 Jun 2003, Richard Crawford <[EMAIL PROTECTED]> wrote:
| Jonathan Bartlett said:
| > I'm very curious why you want this. Anyway, basically, go to the top
| > level and run this perl script( NOTE - I haven't even tested this to see
| > if it will compile, so it will likely delete all your files and set your
| > computer on fire. But it should give you a starting point):
|
| Whoo! The damn script not only ate all my files, it ate all the files on
| every computer in the office, including my boss's Palm Pilot and the
| firmware in our microwave oven! The worst part was that it seduced the
| neighborhood cat, and that made a horrible noise!
|
| Seriously, it looks like this will put me on the right track; I altered it
| a bit to work in only one directory instead of the entire directory tree
| so that if mistakes were made it would only affect one rarely-used course.
| It appears to wipe out the contents of the theform.html but I think
| that's a minor problem (got hundreds of backup copies floating around...).
I tend to do this:
find dir -type f -name '*.html' -exec bsed
's|this|long/thing/with/slashes/this|g' {} ';'
or just:
bsed 's|this|long/thing/with/slashes/this|g' *.html
for just the .html files in the current directory.
You can get bsed here:
http://www.cskk.ezoshosting.com/cs/scripts/bsed
An extremely useful wrapper for sed.
--
Cameron Simpson <[EMAIL PROTECTED]> DoD#743
http://www.cskk.ezoshosting.com/cs/
In the desert, you can remember your name,
'cause there ain't no one for to give you no pain. - America
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list