Search found 5 matches

by petenetman
19 Aug 2010 11:10
Forum: DOS Batch Forum
Topic: Copy every 'n' line from a txt files
Replies: 9
Views: 8771

Re: Copy every 'n' line from a txt files

:roll:

Thanks..... I've cracked it.

I put 4 blank lines in the top and changed the value to 5.

Yippeeee!!!!!!!!!
by petenetman
19 Aug 2010 10:30
Forum: DOS Batch Forum
Topic: Copy every 'n' line from a txt files
Replies: 9
Views: 8771

Re: Copy every 'n' line from a txt files

Ok Sorry I tried it on a seperate text file and all the text got jumbled up for some reason. What I need to is pull the IP address out from the illustration below. The line above the second IP address is a blank. 1. 67.195.112.224 2. 3. 4. 6. 7.74.125.16.66 8. 9. 10. 11. 12.74.125.16.66 13. 14. 15. ...
by petenetman
19 Aug 2010 09:23
Forum: DOS Batch Forum
Topic: Copy every 'n' line from a txt files
Replies: 9
Views: 8771

Re: Copy every 'n' line from a txt files

That's exactly what I want... 6 line 12 line 18 line 24 line etc When I ran it, it missed the first 6 lines then copied everything from line 7 so to speak. I ran the command line just as you stated and output it to a sepearate txt file i.e c:\gawk.exe "NR%6==0" ips.txt > c:\temp\1\ippps.tx...
by petenetman
19 Aug 2010 08:40
Forum: DOS Batch Forum
Topic: Copy every 'n' line from a txt files
Replies: 9
Views: 8771

Re: Copy every 'n' line from a txt files

Thanks

That doesn't do what I want it to do. The string skips the first 6 lines and then copies everything after that.

All I want to do is copy every 6th line

Any idea?
by petenetman
19 Aug 2010 08:16
Forum: DOS Batch Forum
Topic: Copy every 'n' line from a txt files
Replies: 9
Views: 8771

Copy every 'n' line from a txt files

What I am trying to do is copy evey 6th line from a text files into another text file.

eg.

1.some txt
2.some txt
3.
4.some more text
5.even more txt
6.This is the line I want to copyThen evey 6th from here
1.
2
3.
Any ideas?