Platinum Partner

One-line Shell Script For Find And Replace

An equivalent of the other find-replace, except it's a one-liner that generates no temp files, and is more flexible:


perl -pi -e 's/find/replace/g' *.txt


Or, to change matching files in a hierarchy:


find . -name '*.txt' |xargs perl -pi -e 's/find/replace/g'
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}