Discussion:
What is the equivalent of UNIX "tail" command in MS-DOS?
(too old to reply)
k***@yahoo.com
2007-04-17 06:17:09 UTC
Permalink
Hello,

I wanted to know what is the equivalent of the command "tail +10
oldfile > newfile" of UNIX in MS-DOS (start at line 10 of old file and
create a newfile).

Could someone help me?

Thank you.
Timo Salmi
2007-04-17 09:33:25 UTC
Permalink
Post by k***@yahoo.com
I wanted to know what is the equivalent of the command "tail +10
You did not specify your OS, but judging from your headers it probably
is XP, which would make alt.msdos.batch.nt the appropriate newsgroup.
The current one is rather for MS-DOS+Win../95/98/Me batches.

Anyway, for XP see e.g.
69) How do I get the first, or the last, 400 lines of a file?
193214 Feb 16 2007 ftp://garbo.uwasa.fi/pc/link/tscmd.zip
tscmd.zip Useful NT/2000/XP script tricks and tips, T.Salmi

All the best, Timo
--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:***@uwasa.fi <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html
Sjouke Burry
2007-04-17 10:20:27 UTC
Permalink
Post by k***@yahoo.com
Hello,
I wanted to know what is the equivalent of the command "tail +10
oldfile > newfile" of UNIX in MS-DOS (start at line 10 of old file and
create a newfile).
Could someone help me?
Thank you.
Google for unixtools for dos and you can
find head and tail for dos.
they work just like they do in unix.

One possible link:
http://home.att.net/~short.stop/freesoft/unix.htm
k***@yahoo.com
2007-04-18 02:43:30 UTC
Permalink
Post by Sjouke Burry
Post by k***@yahoo.com
Hello,
I wanted to know what is the equivalent of the command "tail +10
oldfile > newfile" of UNIX in MS-DOS (start at line 10 of old file and
create a newfile).
Could someone help me?
Thank you.
Google for unixtools for dos and you can
find head and tail for dos.
they work just like they do in unix.
One possible link:http://home.att.net/~short.stop/freesoft/unix.htm
Thank you for your help. :-)
foxidrive
2007-04-17 09:26:58 UTC
Permalink
Post by k***@yahoo.com
I wanted to know what is the equivalent of the command "tail +10
oldfile > newfile" of UNIX in MS-DOS (start at line 10 of old file and
create a newfile).
For XP/W2K etc:

@echo off
setlocal EnableExtensions
more +10 %1 > %2
Matthias Tacke
2007-04-17 14:38:06 UTC
Permalink
Post by foxidrive
Post by k***@yahoo.com
I wanted to know what is the equivalent of the command "tail +10
oldfile > newfile" of UNIX in MS-DOS (start at line 10 of old file and
create a newfile).
@echo off
setlocal EnableExtensions
more +10 %1 > %2
To be exact,
AFAIK "more +10" displays from the 11th line (it is an offset),
while "Tail +10" displays from the 10th line.
--
Greetings
Matthias
k***@yahoo.com
2007-04-18 02:58:27 UTC
Permalink
Post by foxidrive
Post by k***@yahoo.com
I wanted to know what is the equivalent of the command "tail +10
oldfile > newfile" of UNIX in MS-DOS (start at line 10 of old file and
create a newfile).
@echo off
setlocal EnableExtensions
more +10 %1 > %2
Hello Foxidrive,
your commands work but it does not run all the way for some reason. I
will try it again.

Thank you.

Ted Davis
2007-04-17 13:21:07 UTC
Permalink
Post by k***@yahoo.com
Hello,
I wanted to know what is the equivalent of the command "tail +10
oldfile > newfile" of UNIX in MS-DOS (start at line 10 of old file and
create a newfile).
Could someone help me?
Thank you.
I use tail - one of the CoreUtils for Win32 from
<http://gnuwin32.sourceforge.net/packages/coreutils.htm>

If you like tail, you might also like some of the other *ix utilities
available: <http://gnuwin32.sourceforge.net/packages.html>.
--
T.E.D. (***@gearbox.maem.umr.edu)
Remove "gearbox.maem." from address - that one is dead
Continue reading on narkive:
Search results for 'What is the equivalent of UNIX "tail" command in MS-DOS?' (Questions and Answers)
10
replies
What is the difference between an Apple and a PC?
started 2006-09-04 07:22:54 UTC
computers & internet
Loading...