I'm having some problem with UNIX scripting (ksh), perhaps somebody can help me out?
For example:
------------
Sample content of my log file (text file):
--------------------------------------
File1: ....
info_1 ...
info_2 ...
info_3 ...
File2: ....
info_1 ...
info_2 ...
info_3 ...
File3: ....
info_1 ...
info_2 ...
info_3 ...
...Etc
I'm having a problem to extract relevant information from a portion part of the log file. For example, how can I extract all relevant information for "File2" only (including info_1, info_2 and info_3)?
So if the desired output should be:
---------------------------------
File2: ....
info_1 ...
info_2 ...
info_3 ...
My scripting skill still not very advance. so any help or suggestion would be much appreciated.
But given another situation such as below, is it possible to extract portion of information based on key word: PROBLEM001, providing this is a unique key word. Or can I use the same method mentioned earlier? Please advice. Thanks.