[Novalug] perl help | filename spaces
Richard Barnes
richard.barnes at gmail.com
Wed Mar 17 21:31:30 EDT 2010
One solution here (kind of a hack):
<http://www.macgeekery.com/tips/cli/handling_filenames_with_spaces_in_bash>
With that, it would be:
find . -type f | while read FILE; do perl -e "s/news.html/news\//g;"
-pi.save "$FILE" ; done
Not quite as snappy, but it seems to work for me.
--Richard
On Thu, Mar 18, 2010 at 1:53 AM, Ken Kauffman <kkauffman at headfog.com> wrote:
> So I want to run this one liner, but it doesn't handle filename and
> directory spaces. Does someone with more experience in perl/scripting have
> a proposed solution they would be willing to share with me?
> perl -e "s/news.html/news\//g;" -pi.save $(find . -type f)
> TIA
> Ken
> _______________________________________________
> Novalug mailing list
> Novalug at calypso.tux.org
> http://calypso.tux.org/mailman/listinfo/novalug
>
>
More information about the Novalug
mailing list