帮帮忙,用C作一个SHELL# Unix - 噫吁兮,危乎高哉
s*z
1 楼
在UNIX下些一个C program,执行SHELL功能,也就是说能象SHELL一样
识别,执行COMMAND,具体如下:
First, implement the basic parts to print the prompt and
read the command line. In this first-cut version, just
print the
command that is to be executed instead of trying to
execute it. After you are able to determine the command
name,
complete the code to parse the command line and build
the argv array, again just printing the results to stdout.
Next, implement the command execute functionality.
This means you will i
识别,执行COMMAND,具体如下:
First, implement the basic parts to print the prompt and
read the command line. In this first-cut version, just
print the
command that is to be executed instead of trying to
execute it. After you are able to determine the command
name,
complete the code to parse the command line and build
the argv array, again just printing the results to stdout.
Next, implement the command execute functionality.
This means you will i