Files
oam/snippets/sed.sh
2025-07-10 20:15:43 +02:00

8 lines
187 B
Bash

#!/usr/bin/env sh
# Quote whatever is not a space
sed -E 's|([[:graph:]]+)|"\1"|g'
# Delete 5 lines after a pattern (including the line with the pattern)
sed '/pattern/,+5d' 'file.txt'