sed:replace_words_or_characters
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
sed:replace_words_or_characters [2020/07/15 09:30] – external edit 127.0.0.1 | sed:replace_words_or_characters [2020/08/16 11:35] (current) – removed 192.168.1.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== SED - Replace words or characters ====== | ||
- | |||
- | ===== Simple Change ===== | ||
- | |||
- | |||
- | <code bash> | ||
- | sed ' | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Case-Insensitive Change ===== | ||
- | |||
- | <code bash> | ||
- | sed ' | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Replace multiple spaces with a single space ===== | ||
- | |||
- | <code bash> | ||
- | sed 's/ */ /g' infile.txt | ||
- | </ | ||
- | |||
- | or | ||
- | |||
- | <code bash> | ||
- | ip route show | sed ' | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
sed/replace_words_or_characters.1594805433.txt.gz · Last modified: 2020/07/15 09:30 by 127.0.0.1