3ef4a3ca05
\x escape sequences are GNU specific. Use the octal escape code instead. filters/calendar is beyond help. It would need a complete rewrite to make it work with POSIX awk. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
17 lines
242 B
Awk
Executable file
17 lines
242 B
Awk
Executable file
#!/usr/bin/awk -f
|
|
|
|
BEGIN {
|
|
dim = "\033[2m"
|
|
cyan = "\033[36m"
|
|
reset = "\033[0m"
|
|
}
|
|
{
|
|
# Strip carriage returns from line
|
|
gsub(/\r/, "", $0)
|
|
|
|
if ($0 ~ /^On .*, .* wrote:/ || $0 ~ /^>+/) {
|
|
print dim cyan $0 reset
|
|
} else {
|
|
print $0
|
|
}
|
|
}
|