Concatenate text files with Windows command line, dropping leading lines
Posted
by James
on Stack Overflow
See other posts from Stack Overflow
or by James
Published on 2010-03-19T12:39:26Z
Indexed on
2010/03/19
12:41 UTC
Read the original article
Hit count: 219
I need to concatenate some relatively large text files, and would prefer to do this via the command line. Unfortunately I only have Windows, and cannot install new software.
type file1.txt file2.txt > out.txt
allows me to almost get what I want, but I don't want the 1st line of file2.txt to be included in out.txt.
I have noticed that more
has the +n
option to specify a starting line, but I haven't managed to combine these to get the result I want. I'm aware that this may not be possible in Windows, and I can always edit out.txt by hand to get rid of the line, but is there a simple way of doing it from the command line?
© Stack Overflow or respective owner