Using awk or sed how can I select lines which are occurring between two different marker patterns? There may be multiple sections marked with these
awk
sed
Don_crissti's answer from Show only text between 2 matching pattern?
firstmatch="abc" secondmatch="cdf" sed "/$firstmatch/,/$secondmatch/!d;//d" infile
which is much more efficient than AWK's application, see here.