mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-22 19:44:25 +00:00
chore(sed): comment non-space blocks in lines
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# Quote any set of characters that is not a space.
|
||||
sed -E 's|([[:graph:]]+)|"\1"|g'
|
||||
|
||||
# Delete lines matching "OAM" from a file.
|
||||
# Overwrite the source file with the changes.
|
||||
sed '/OAM/d' -i .bash_history
|
||||
|
||||
4
snippets/sed.sh
Normal file
4
snippets/sed.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!sh
|
||||
|
||||
# Quote whatever is not a space.
|
||||
sed -E 's|([[:graph:]]+)|"\1"|g'
|
||||
Reference in New Issue
Block a user