bookmark

bash - grep (awk) a file from A to first empty line - Stack Overflow


Description

/PATTERN/,/^$/{/^$/d; p} /PATTERN/,/^$/ match lines from PATTERN to empty line. {/^$/d; p} remove (d) the lines being on ^$ format, print (p) the rest.

Preview

Tags

Users

  • @jil

Comments and Reviews