kevin lyda writes:
> Lars Hecking spoke thusly:
> >$ for i in `find /foo/bar -name '*.html' -print` ; do mv ${i} ${i}.bak ; \
> > sed 's,tag,replacement,g' ${i}.bak >${i} ; rm -f ${i}.bak ; done
> >
> > If the tag is different in different files, it gets more complicated,
> > and others might suggest perl ...
>> i think sed's the way to go and sent an email privately with much the
> same suggestion. one point though is the 10,000 to 35,000 files.
> won't the find command blow away the command line limit length?
> i split it up - find > file.list; cat file.list | xargs -n 1 script
Generally, I agree, but I think that GNU find and bash should
cope quite well. Assuming the system in question is running Linux :)
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!