View Full Version : How do I do this is DOS/Windows?
In UNIX
cat file.txt | wc -l
How do I do this in DOS, or can I do this in Windows file manager?
Mearl Platt
05-02-2002, 05:46 PM
What does that command do? I'm pretty good at dos but I know nothing about unix.
NoName
05-02-2002, 06:59 PM
If I'm not mistaken, wc does a word count? While there's nothing built into DOS to do that, it may be that somebody somewhere has written UNIX-like utilities for DOS that you can find with Google. If you can't find of anyone that has you could open the file with Word (or write your own DOS program, I guess)
glenn
05-02-2002, 07:14 PM
There's nothing in DOS or Windows to do this. The previous poster is correct, you'll need to open the file in Word or some other package that will provide the line count. I suspect Word will give you a word count as well, but don't know how to do it.
Or better yet, as you're obviously proficient in *nix, upload the file to a *nix box and run the command directly.
Cho Da
05-02-2002, 09:20 PM
Unix for Winblows! See www.cygwin.com
I use it all the time. perl and awk are so much easier to use for parsing and fixing output that is misformatted than to rerun sets of queries that take hours...
I actually have an Apache web server with php and MySQL (CAMP 1.3.20) running on my work laptop for testing.
Very exciting Cho Da. I'll allocate a couple of hours this afternoon to look at this.
Glen, unfortunately I no longer have a machine that runs UNIX.
Counting the number of lines in file shouldn't be this difficult, F**k Gates.
Thanks for everyones help.
CaptainCavy
05-03-2002, 12:35 PM
What about the "wc24" utility at the following link?
http://www.xs4all.nl/~ferguson/dosfilt.html
Actual download link is:
http://www.xs4all.nl/~ferguson/freeware/wc24.zip
[edited to add download link]
Arlie_Proctor
05-04-2002, 10:01 PM
I agree, I miss having access to a unix machine. Stumbling around with basics like this in a Windows environment stinks. Things that used to take me 10 minutes to write and 30 seconds to run using basic unix commands now take me hours to write and hours to run in Access, if they don't crash.
However, if you're stuck in the MS world, try importing the file into access as a table containing a single text field and then count the records in the imported table (yuck).
Arlie
vBulletin® v3.7.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.