Last active
April 18, 2017 11:02
-
-
Save thegeorgeous/df1c8c0af892a15e259145216436d206 to your computer and use it in GitHub Desktop.
Useful Sed Scripts
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
# Replace multiple whitespaces with a comma | |
# Example: | |
# Convert dig answer output into a CSV | |
sed -i -e 's/ \{1,\}/,/g' file | |
# Add a character at the end of a file | |
# Example add comma to the end of a line | |
sed -i -e 's/$/|/g' abc.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment