Bash: printing lines of file until SPECIAL_LINE (not included)
10:21 13 Apr 2026

I came up with this:

awk '{print}/SPECIAL_LINE/{exit}' file.txt | head -n -1

Any other suggestions?

Maybe it could be more elegant.

bash awk text-processing unix-head unix-text-processing