From: Marc Hoeppner Date: 2007-07-11T20:28:16+09:00 Subject: Re: if / else, how to include next line Hm, maybe I was in fact a bit vague here, sorry. I think grep will do the job (sometimes its just simpler than one expected...), but now just out of curiosity: I have one file, structured as shown above. It contains some 600 "entries" (that is a KOG-number followed by 8 lines of information). Out of these 600-someting entries, I only need a particular subset. The information on which KOG-entries I need are in a second text file (basically the KOG-numbers, one in each line), like so: KOG0019 KOG0101 KOG0245 etc Ideally,the program would read this keyword-file, store the information in a variable (an array, I guess) and then use this array to identify the entries in the "main" file and puts them into stdout. *scratches head* -- Posted via http://www.ruby-forum.com/.