All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
pcmattman
Member
Posts: 2566 Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:
Post
by pcmattman » Sat Apr 14, 2007 6:39 pm
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
.
frank
Member
Posts: 729 Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA
Post
by frank » Sat Apr 14, 2007 7:07 pm
Cygwin has one.
pcmattman
Member
Posts: 2566 Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:
Post
by pcmattman » Sat Apr 14, 2007 7:08 pm
Thanks... didn't realize that.
Now I know my OS is 372 A4 pages long, 17555 lines long
.
Alboin
Member
Posts: 1466 Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia
Post
by Alboin » Sat Apr 14, 2007 8:45 pm
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...
C8H10N4O2 | #446691 | Trust the nodes.
pcmattman
Member
Posts: 2566 Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:
Post
by pcmattman » Sat Apr 14, 2007 8:49 pm
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...
Tyler
Member
Posts: 514 Joined: Tue Nov 07, 2006 7:37 am
Location: York, England
Post
by Tyler » Sun Apr 15, 2007 10:39 am
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?
pcmattman
Member
Posts: 2566 Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:
Post
by pcmattman » Mon Apr 16, 2007 12:10 am
No. Everything is built into the kernel.
Guess that makes it a monolithic kernel?
GLneo
Member
Posts: 237 Joined: Wed Dec 20, 2006 7:56 pm
Post
by GLneo » Tue Apr 17, 2007 8:55 am
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
chase
Site Admin
Posts: 710 Joined: Wed Oct 20, 2004 10:46 pm
Libera.chat IRC: chase_osdev
Location: Texas
Discord: chase/matt.heimer
Contact:
Post
by chase » Tue Apr 17, 2007 10:03 am
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
GLneo
Member
Posts: 237 Joined: Wed Dec 20, 2006 7:56 pm
Post
by GLneo » Tue Apr 17, 2007 11:42 am
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:
Attachments
lemonossloc.JPG (33.91 KiB) Viewed 1796 times
LocMetricsPie.png (3.64 KiB) Viewed 1796 times
bubach
Member
Posts: 1223 Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:
Post
by bubach » Tue Apr 17, 2007 2:50 pm
cat is called type in dos, but as chase said, it's copy you want.
jnc100
Member
Posts: 775 Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:
Post
by jnc100 » Tue Apr 17, 2007 3:43 pm
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.
ehird
Member
Posts: 214 Joined: Thu Mar 15, 2007 8:48 am
Post
by ehird » Wed Apr 18, 2007 6:13 am
if you were using zsh you could do `cat **/*.c > result.txt'
(** = any directory, recursively)