Avatar of mac_g
mac_g
Flag for Saudi Arabia

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



LinuxWindows BatchShell ScriptingPythonUnix OS

Avatar of undefined
Last Comment
mac_g

8/22/2022 - Mon