[Solved] Print specific lines after a text present in another text file

[ad_1]

while read str; do sed -n "/^$str/,/^C/ {/^$str/p;/^D/p}" Text-file-2; done < Text-file-1

This is the sed command, contributed by steeldriver on another forum. And its working fine.

[ad_2]

solved Print specific lines after a text present in another text file