Files
NANOKVM-LicheeRV-Nano-Build…/freertos/Source/.github/scripts/find_replace.sh
2024-03-19 16:54:57 +08:00

8 lines
188 B
Bash
Executable File

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