#!/bin/sh # query-replace files recursively, substituting in place STRING1=$1 STRING2=$2 find . -type f | xargs -n 255 perl -p000i.bak -e "s/${STRING1}/${STRING2}/g" #### $ query-replace.sh '\<(\/)?[hH]3\>' '\<${1}H1\>'