I am attempting to pull everything between a regex and the next blank line from a file. I am having trouble with the regex for a blank line. Here is what I tried.
awk '/Online modules/, /^$/' filename.txt
I also tried variations with \n and \n\n and am not having any luck. I keep getting everything from the first regex through until the end of the file. Any help is appreciated, thanks in advance.
@danmero, same result, from the regex to the end of the file.
The file is rather large, so performed the cat -vet and included a few lines before my first regex through to a few lines after the blank line. I also omitted much of what was between. Also, I know Online is spelled differently than what I originally included. I simplified it a bit for my post. But here is the contents. Basically, I want to pull the block of text that starts On-line (non screened) through until a blank line appears, then stop. The following section might not always say Operations Libraries, it could be something else, that is why I have to key on the blank line as my ending regex. Thanks again guys!
Neither worked, when I vi the file it looks like the line is an entire line of spaces out a record length of 80, perhaps that is why none of these are hitting.
I should have asked you to attach the file snippet instead of posting it. Anyways no hidden / ctrl characters in the file so your original awk command should work that is...