Want to search for a every paragraph that has a certain string and return some string from that paragraph
Need to do with linux shell script if possible.
I have some data in unix file as above.
I have a file with multiple values for STRING_TO_SEARCH like
job.txt:
Example -
I want to run a for loop for each value of STRING_TO_SEARCH and capture both STRING_TO_SEARCH and server: value for that paragraph
Desired output -
In each paragraph number of rows will vary and fields server: WANT TO RETURN and group:. This line contains a1 but can have space or characters can can occur on any row.
评论
?
参与讨论