i want to search a string in a file with 5 line below and 5 line above
Use the search function of the forum and show what you have tried so far. Thank you. I will remove all helping answers if OP did not show any effort before; thanks for your understanding.
If you want the same amount of lines before and after you can use -C num.
grep -C 3 foo README.txt