Created
April 14, 2021 15:49
-
-
Save rojenzaman/8bcc89b568ca810562fd2929ea9e261c to your computer and use it in GitHub Desktop.
Replace specified character between two specified strings.
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
# s@\(START.*\)FOO\(.*END\)@\1BAR\2@ | |
$ echo "START FOO END FOO" | sed -e :1 -e 's@\(START.*\)FOO\(.*END\)@\1BAR\2@;t1;' | |
START BAR END FOO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment