Posted By

ches on 02/15/08


Tagged

regex Bash replace perl


Versions (?)


Advertising

Submit Site


Who likes this?

2 people have marked this snippet as a favorite

moonbather
noah


Perl Search and Replace One-liner with xargs -0


Published in: Bash 



Website Promotion
DIRECTORY
is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


\Q...\E perl quoting means no ugly escaping in the regex. find's -print0 with xargs -0 is the secret to handling files with spaces in their names.

Expand | Embed | Plain Text
  1. find . -name "*.html" -print0 | xargs -0 perl -p -i -e 's|\Qhttp://66.36.242.244/~olxhxlwq/\E|http://www.johnclarkprose.com/|g'

Report this snippet 

You need to login to post a comment.

Download royalty free graphics