try grep. I dont think that you can tell it to grep x lines, but you can define delimiters (for example a paragraph with -p, the delimiter would be a blank line). If you need an exact number of lines you could get the line number where grep found something and make a script to cut those parts. --Orm >I'm looking for a command or a script that is able to find a string in a text file. >But I want to display for example 10 lignes before the string, I search, and 10 >lignes after. - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.rutgers.edu