Recursive grep + sed search and replace

One-liner recursive grep + sed search and replace for php or other file types:

grep "subject" * -rl --include=*.php | xargs sed -i -e 's/subject/replacement/g'

One Response to Recursive grep + sed search and replace

  1. Your article is very short and could not fully answer all the nuances that interested me.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Anti-Spam Quiz: