Code Comments
Programming Forum and web based access to our favorite programming groups.On Linux and Mac OS X, I'm doing something like this to print a regex substutution of matching lines in a batch of files: find . -name 'somefile' | xargs perl -ne 'print if s/search/replace/' Problem is spaces appearing in the output of "find" cause errors. I tried find . -name 'somefile' -printf '"%p"\n' | xargs --max-args=1 perl -ne 'print if s/search/replace/' ... and other variations, but no luck, perl sees the file paths containing spaces as seperate arguments. Any suggestions? Thanks, Isao
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.