Last active
April 23, 2022 21:47
-
-
Save mauricios/2a502d632584739b73fcf9a856162b9d to your computer and use it in GitHub Desktop.
Text manipulation commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!# /bin/bash | |
# Replace string in all files in a directory (macOS) | |
grep -Rnl "old_string" **/*.txt | xargs sed -i "" 's/old_string/new_string/g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment