Skip to content

Instantly share code, notes, and snippets.

@gcjyzdd
Last active September 22, 2020 11:44
Show Gist options
  • Select an option

  • Save gcjyzdd/e498ed7245c3adbaaad0bbddee399326 to your computer and use it in GitHub Desktop.

Select an option

Save gcjyzdd/e498ed7245c3adbaaad0bbddee399326 to your computer and use it in GitHub Desktop.
Search and replace symbols using ag and sed on windows. The following example replace lightSPDs with lightSPDs_buffer
ag -l lightSPDs > output.txt
for /f %%a in (output.txt) do sed -i -e "s/lightSPDs/lightSPDs_buffer/g" %%a
del output.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment