Last active
August 1, 2020 16:19
-
-
Save packetchef/5a76e543374caca8fadce5f13bab5ecb to your computer and use it in GitHub Desktop.
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
# For the string "abc:123", append "def" to "abc" | |
$ echo "abc:123" | sed 's/abc/&def/' | |
# Add a space after every alphanumeric character | |
$ echo "abc:123" | sed 's/[A-Za-z0-9]/& /g' | |
# Use stdin instead of passing a file | |
$ sed 's/abc/def/' <&1 | |
abcdefghi | |
defdefghi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment