Created
March 3, 2023 16:59
-
-
Save HubTou/80485456772d945febc659caaad377f5 to your computer and use it in GitHub Desktop.
AWK 1-liner script to print a file till the first empty line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
# Usage 0: awk '!NF{exit}{print}' file | |
# Usage 1: print_till_empty_line.awk file | |
# Usage 2: cat file | print_till_empty_line.awk | |
NF {exit} | |
{print} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment