Posted By

sebastian_bergmann on 01/23/08


Tagged

replace sed zsh find


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

moonbather
smvnet


Replace string in multiple files


 / Published in: Bash
 

  1. sed -i 's#old#new#gi' **/*.suffix

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jkramer on January 30, 2008

Short: find . -iname ".suffix" -exec sed -i -e 's#old#new#gi' {} \; Even shorter (ZSH): sed -i -e 's#old#new#gi' */*.suffix

Posted By: jkramer on January 30, 2008

That's ** (two asterisks), I don't get the format of this comment thing here.

You need to login to post a comment.