Skip to content

Instantly share code, notes, and snippets.

@micksmix
Created November 13, 2018 07:03
Show Gist options
  • Select an option

  • Save micksmix/ab975d83cf403439c1f1ed26d2d346bf to your computer and use it in GitHub Desktop.

Select an option

Save micksmix/ab975d83cf403439c1f1ed26d2d346bf to your computer and use it in GitHub Desktop.
ag-replace on Windows (with gnu on windows tools installed)
echo off
set arg1=%1
set arg2=%2
ag -0 -l %arg1% | xargs -0 sed -ri.bak -e "s/%arg1%/%arg2%/g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment