2013-09-04

2013-09-04 Command Line Tools

While I'm developing the helloworld executable as a project inside NetBeans, I did start to wonder if each of the commands I want to implement in the basic command set would be projects in their own right.  Most of them are only going to be a main.c file with a few functions, so I could just create a c file for each one under a project called Commands or something, then customise the makefile to build each into a separate executable.  Not sure what NetBeans would think of this though.

Looking through the list of commands available in standard command line interpreters, I think I'll need to consider implementing the following commands (probably in this order):

helloworld - :D
echo - Tests command line arguments
type - Tests reading files

ls - Tests reading directory information
more - Tests command piping and buffering
screen - Combines the command interpreter and more
touch - Tests creating a file
copy - Combines type and touch
join - Combines type and touch
mkdir - Tests creating a directory
rm - Tests deleting a file
move - Combines copy and rm
head - Extends more
tail - Extends more
od - Gives a more consistent for my memdmp() function.

Next step is to remove all the reference to the libc stuff from the kernel so that I can link in the single libc.  This will mean I need to add some form of define so that when the library is linked with the kernel, it uses a special function to associate the various kernel functions (read, write, etc.) directly, rather than using the method that executables use.

No comments:

Post a Comment