Find and Replace in the Terminal. Waylon Walker Author November 12, 2020 1 min read notes about find and replace techniques Copy this post URL Rich Markdown Text View Markdown View Text curl .ansi grepr # grepr() {grep -iRl "$1" | xargs sed -i "s/$1/$2/g"} ```bash grepr() {grep -iRl "$1" | xargs sed -i "s/$1/$2/g"} grepd # grepd() {grep -iRl "$1" | xargs sed -i "/^$1/d"} CocSearch # :CocSearch published: false -g *.md Share this post Twitter Bluesky LinkedIn WhatsApp Facebook Telegram Pinterest Reddit Hacker News Email Copy link