s*z 发帖数: 713 | 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 | c*****t 发帖数: 1879 | 2 For your own good, don't ask this kind of questions. If you
are really stuck at specific places, then we can help.
【在 s*z 的大作中提到】 : 在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.
| m*******m 发帖数: 182 | 3 Exactly, pal. You can't expect people to write code for
your
class/work just like that. The requirement looks like a
reasonable amount of work. Which exact part you find hard
to
do?
【在 c*****t 的大作中提到】 : For your own good, don't ask this kind of questions. If you : are really stuck at specific places, then we can help.
| m*****e 发帖数: 4193 | 4 Or send me a check of $10 and I will send him the code.
【在 m*******m 的大作中提到】 : Exactly, pal. You can't expect people to write code for : your : class/work just like that. The requirement looks like a : reasonable amount of work. Which exact part you find hard : to : do?
| t****n 发帖数: 1347 | 5 这么简单的东西还要人帮忙?
【在 s*z 的大作中提到】 : 在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.
| t****n 发帖数: 1347 | 6 OK就给你一个吧, 你有种把这CODE交上去也行: |
|