I got stuck with following text processing in a file, such that -> Search the first pattern and then search second pattern and then insert a new line above the second pattern.
File Sample:
some text 1
First-search-text some other text
some text 2
some text 3
Second-search-text
Desired output to be replaced in the file:
some text 1
First-search-text some other text
some text 2
some text 3
New line to be inserted
Second-search-text
any pointers will be great help with awk or sed.