Created
April 1, 2016 04:25
-
-
Save quickgrid/f00d3f11aa03b4f403ec47409f51a3c1 to your computer and use it in GitHub Desktop.
The code replaces all the matches in the given text file with the given string.
This file contains hidden or 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 | |
pattern="abc" | |
replacedValue="cde" | |
sed -i "s/$pattern/$replacedValue/g" sedInput.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment