[nzlug] A little help with some find and replace?
Simon
greminn at gmail.com
Fri Mar 28 11:27:51 NZST 2008
On Fri, Mar 28, 2008 at 10:51 AM, Philip Murray <pmurray at nevada.net.nz> wrote:
> > [ListFiles ../Website/Orders/[current]/][hideif [filename]^icon]
> >
> > which needs to be changed to:
> >
> > [ListFiles ../website/orders/[current]/][hideif [filename]^icon]
>
>
>
> s/\[(\w+) (.*)\]/[\1 \L\2\E]/g
This works great... So i have the following:
find . -name '*.html' | xargs perl -pi -e 's/\[(\w+) (.*)\]/[\1 \L\2\E]/g'
Is it possible to get it to output the filename if it changes?
Thanks again,
Simon
More information about the NZLUG
mailing list