mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 13:44:24 +00:00
Added sed's notes to the knowledge base
This commit is contained in:
14
knowledge base/sed.md
Normal file
14
knowledge base/sed.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# SED
|
||||
|
||||
## TL;DR
|
||||
|
||||
```shell
|
||||
# Delete lines matching "OAM" from a file.
|
||||
sed -e '/OAM/d' -i .bash_history
|
||||
|
||||
# Change fstab entries.
|
||||
sed /etc/fstab \
|
||||
-e "s|#.*\s*/boot\s*.*|/dev/sda1 /boot vfat defaults 0 0|" \
|
||||
-e "s|#.*\s*ext4\s*.*|/dev/sda2 / btrfs compress-force=zstd 0 0|" \
|
||||
-e '/#.*\s*swap\s*.*/d'
|
||||
```
|
||||
Reference in New Issue
Block a user