Oct 21, 2014
Find and replace text in multiple files using Linux
Just had the problem. Here is the one line solution:
find . -name '*.tex' | xargs sed -i -e 's/searchfor/replacewith/g'
Can even do regex!
seen from Malaysia

seen from Malaysia
seen from United States

seen from United States

seen from United States
seen from China

seen from Malaysia
seen from United States
seen from United States
seen from Japan

seen from United States
seen from United States
seen from China
seen from United States
seen from China
seen from China
seen from United States
seen from China
seen from China
seen from Kazakhstan
Find and replace text in multiple files using Linux
Just had the problem. Here is the one line solution:
find . -name '*.tex' | xargs sed -i -e 's/searchfor/replacewith/g'
Can even do regex!