mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
497 B
497 B
SED
TL;DR
# Delete lines matching "OAM" from a file.
# Overwrite the source file with the changes.
sed '/OAM/d' -i .bash_history
# Show changed fstab entries.
# Don't save the changes.
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'