#!/bin/bash # This script places common-methods-js into JavaScript files in Thunderforce that contain # and in comments find ../../.. -name \*.js -and -exec grep -q "" \{\} \; -print0 | xargs -0 -Ixxx sed -i "//,// { // r common-methods-js 2,\$ d }" xxx