tail +5 somefile | head -1 or cat -n somefile | grep ' *5 ' or sed -ne 5p somefile or ... On 03/28/2003 12:35 -0600, Sadanapalli, Pradeep Kumar (MED, TCS) wrote: >> Hi Friends, >> I am running RedHat Linux 8.0. I want to do the following . >> >> I have a file with several lines of data in it. I want to extract a line >> I want from the file >> and display the whole line of data. 'grep' searches only for patterns,as >> I believe. I don't want to search for patterns. >> I just directly want to extract the data by line numbers.For example, I >> want to get the data in line number 5. >> >> How can I do this? Is there any command to do this? Please help me. I >> hope I am clear. >> >> Thanks, >> Pradeep >> - >> To unsubscribe from this list: send the line "unsubscribe linux-admin" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html End of included message -- +--------------------------+------------------------------+ | Tim Walberg | twalberg@mindspring.com | | 830 Carriage Dr. | www.mindspring.com/~twalberg | | Algonquin, IL 60102 | | +--------------------------+------------------------------+