Skip to content

Instantly share code, notes, and snippets.

@johnallen3d
Created August 18, 2022 20:41
Show Gist options
  • Save johnallen3d/eb776961d4b49db42e3280ace237cbad to your computer and use it in GitHub Desktop.
Save johnallen3d/eb776961d4b49db42e3280ace237cbad to your computer and use it in GitHub Desktop.
Find and replace macOS
#! /usr/bin/env bash
rg --files-with-matches "${1}" \
| xargs sed -i '' "s/${1}/${2}/g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment