mac_g
asked on
shell script : how to extract file content before after a search string for the files in directory
I want to read the file contents before and after search string. The contents may be 25 or 50 chars will be fine.
example : file01
-------------------------
A better description inspires a more informed "discussion". The more details you include, the better equipped our community is to help you find a solution.
I want extract strings before & after discussion in the above file given as output.
The output should display in below format :
before 25 chars + search string + 25 chars
example : file01
-------------------------
A better description inspires a more informed "discussion". The more details you include, the better equipped our community is to help you find a solution.
I want extract strings before & after discussion in the above file given as output.
The output should display in below format :
before 25 chars + search string + 25 chars
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@simon3270 .... thank you
working perfect ..
working perfect ..
ASKER
working .. .thanks
Closing this thread
Closing this thread
If you try doing this as a Linux command pipeline, likely the pipeline will be far more fragile + complex, than a script.