LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Question about copying lines from Ascii file (https://www.linuxquestions.org/questions/linux-general-1/question-about-copying-lines-from-ascii-file-368049/)

stewchcken 09-29-2005 03:37 AM

Question about copying lines from Ascii file
 
Dear *,

I just have a question regarding copying ascii file's content.

I need to copy part of contents (e.g from line 382 to line 582) from a log file which is ASCII format.

Is there any command to copy line 382 to line 582 to another file?

Thanks and RGDS

Quis 09-29-2005 04:11 AM

you can try to

cat <asciifile>

and use the

head

and

tail

command. See their man pages for the syntax

theYinYeti 09-29-2005 06:22 AM

sed -n '382,582 p' logfile.log >destfile.log

should work.

Yves.


All times are GMT -5. The time now is 02:52 PM.