Page 1 of 1
cat for Windows?
Posted: Sat Apr 14, 2007 6:39 pm
by pcmattman
Does anyone know where I can get a version of 'cat' for windows?
I need something that'll let me do this:
ie. put all the .c files together and put them into whatever.txt.
Any ideas? I would write one, but I couldn't be bothered
.
Posted: Sat Apr 14, 2007 7:07 pm
by frank
Cygwin has one.
Posted: Sat Apr 14, 2007 7:08 pm
by pcmattman
Thanks... didn't realize that.
Now I know my OS is 372 A4 pages long, 17555 lines long
.
Posted: Sat Apr 14, 2007 8:45 pm
by Alboin
pcmattman wrote:Thanks... didn't realize that.
Now I know my OS is 372 A4 pages long, 17555 lines long
.
Love of Mike. The MINIX kernel is only what? 4000 lines? However, that's a microkernel, and yours...err..isn't.
What can it currently do? (Generally.)
Maybe I should resume my osdeving....That is, if this bloody Gentoo ever finishes compiling KDE...
Posted: Sat Apr 14, 2007 8:49 pm
by pcmattman
Hmmm...
Networking is what I'd say takes up a lot of that.
Other things:
Preemptive multittasking
Console i/o
File handling (two files, one for floppy and one for devices) - both huge
ATA block device driver
Floppy driver
Shell
Standard library support
15 headers (one with all PCI vendors and such)
So yeah, it is sort of big.
You can view the code if you want on my sourceforge site.
I honestly don't know whether or not it would be classed as a microkernel or whatever...
Posted: Sun Apr 15, 2007 10:39 am
by Tyler
pcmattman wrote:I honestly don't know whether or not it would be classed as a microkernel or whatever...
Do the modules of the kernel run in user mode?
Posted: Mon Apr 16, 2007 12:10 am
by pcmattman
No. Everything is built into the kernel.
Guess that makes it a monolithic kernel?
Posted: Tue Apr 17, 2007 8:55 am
by GLneo
don't include headers then give us results
, also is there a way to get cat to search directories:
Code: Select all
find /myos/ -name "*.c" | cat > out.txt
Posted: Tue Apr 17, 2007 10:03 am
by chase
I think this would have worked too:
And if you wanted to cat to the screen (can't redirect it):
However I like cygwin alot so I'd have used cat myself. For cat'ing out all the .c files in subdirectories I think you'd want something like:
Code: Select all
find /myos -iname "*.c" -exec cat {} \; > out.txt
Posted: Tue Apr 17, 2007 11:42 am
by GLneo
thanks chase that seems to work. my OS is 5,973 and thats just the c files, plus i wrote every line, no coping gnu, bsd, PD, code for me!
hay! i just found this cool tool:
http://www.locmetrics.com/
here is some output:
Posted: Tue Apr 17, 2007 2:50 pm
by bubach
cat is called type in dos, but as chase said, it's copy you want.
Posted: Tue Apr 17, 2007 3:43 pm
by jnc100
gnuwin32 (.sourceforge.net) provides cat and loads of other gnu utils for windows. No need to get cygwin if you don't want it. Gives Windows a nice, warm fuzzy feeling...
Regards,
John.
Posted: Wed Apr 18, 2007 6:13 am
by ehird
if you were using zsh you could do `cat **/*.c > result.txt'
(** = any directory, recursively)