Please, help me to write such script.
I have some text file with name filename.txt
I must check if this file contains string "test-string-first", I must cut from this file string which follows string "keyword-string:" and till first white-space and save it to some variable.
For example. File:
Start 15022011 Eng 12-3-42
SN1232324422 11 test-string-first
SN322211 securities
HH keyword-string:123456@321.net mark (11-22)
This file contains "test-string-first" and I need to get 123456@321.net string (between "keyword-string:" and first space)