Jeff
01-13-2007, 03:36 AM
For a few years I've been happily using this to find and replace text from the command line
find * -name '*.html' | xargs perl -pi -e "s/2002-2006/2002-2007/sg;"
thanks to Arthur http://aota.net/forums/showthread.php?postid=56104#post56104
However I encountered a snag tonight - if a file name includes a ' (e.g. the_year's_best.html) I get an error:
xargs: unmatched single quote
How do I handle this?
find * -name '*.html' | xargs perl -pi -e "s/2002-2006/2002-2007/sg;"
thanks to Arthur http://aota.net/forums/showthread.php?postid=56104#post56104
However I encountered a snag tonight - if a file name includes a ' (e.g. the_year's_best.html) I get an error:
xargs: unmatched single quote
How do I handle this?