Suppose I have a bash variable with multiline text inside it.
$ TEXT=$(cat<<-EOTEXT
line1
line2
======
line3
line4
======
EOTEXT)
$ echo "$TEXT"
line1
line2
======
line3
line4
======
How do I extract a text between =====
? The desired output is:
line3
line4
Please note that the line could be from 3 to 4000, so it should not be line specific.