1#!/bin/bash 2old_text=$1 3new_text=$2 4echo "Old text: ${old_text}" 5echo "New text: ${new_text}" 6grep -rl "${old_text}" . | xargs gsed -i -e '1h;2,$H;$!d;g' -e "s/${old_text}/${new_text}/g" 7