# sed -i は上書き更新オプション find ./path/do/dir -name '*.js' | xargs sed -i "s/foo/bar/g" # Mac だと sed -i が使えないので、事前に brew install gnu-sed などして gsed を使えるようにする find ./path/do/dir -name '*.js' | xargs gsed -i "s/foo/bar/g" Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationWhat you can do with signing up