-   Linux - Newbie (
-   -   Copying parts of a text file (

austen77 09-01-2005 09:22 PM

Copying parts of a text file
Hi, I'm wondering what commands to use to be able to copy a certain number of lines from a text file. For instance, say i wanted to copy the first 10 lines and the last 3 lines and put them into a seperate file.

I have been able to use grep to grab lines from the start of a text file but i am stuck on how to grab them from the end of a file. Any help would be appreciated.

homey 09-01-2005 09:34 PM

Have a look at these.
man head
man tail

austen77 09-01-2005 09:38 PM

Those worked like a charm! Thanks a lot.

homey 09-01-2005 09:56 PM

You're welcome~ :)

All times are GMT -5. The time now is 09:34 PM.