A-Simple-Shell

所属分类:Linux/Unix编程
开发工具:Unix_Linux
文件大小:109KB
下载次数:58
上传日期:2011-05-09 10:58:31
上 传 者wmtf
说明:  Shell或者命令行解释器是操作系统中最基本的用户接口,该项目是写一个简单的Shell程序myshell。具体的详细功能见压缩包文件: A Simple Shell设计报告.docx
(Shell command line interpreter or operating system is the most basic user interface, the project is to write a simple Shell program myshell. Details of the specific features, see archive file: A Simple Shell design report. Docx)

文件列表:
A Simple Shell\Makefile (176, 2010-06-16)
A Simple Shell\Makefile~ (177, 2010-06-16)
A Simple Shell\myshell (13460, 2010-06-16)
A Simple Shell\myshell.c (6906, 2010-06-16)
A Simple Shell\myshell.c~ (6946, 2010-06-15)
A Simple Shell\myshell.h (1509, 2010-06-15)
A Simple Shell\myshell.o (4420, 2010-06-16)
A Simple Shell设计报告.docx (102231, 2010-06-16)
A Simple Shell (0, 2011-05-09)

User Manual myshell - basic shell replacement usage: > myshell reads in a line of keyboard input at a time, parsing it into tokens that are separated by white spaces (set by #define SEPARATORS). 1. Internal Commands/Aliases: cd - change dirtectory (PWD environment variable updated) clr - clear the screen using the system function clear dir - list the current directory contents (ls -al ) environ - list all the environment strings help - display the user manual using the more filter pause - pause operation of the shell until 'Enter' is pressed quit - quit from the program with a zero return value 2. External Commands: All other command line inputs are executed via a fork and exec 3. The shell support i/o-redirection on either or both stdin and/or stdout. i.e. the command line: programname arg1 arg2 < inputfile > outputfile will execute the program programname with arguments arg1 and arg2, the stdin FILE stream replaced by inputfile and the stdout FILE stream replaced by outputfile. stdout redirection should also be possible for the internal commands: dir, environ, echo, & help. With output redirection, if the redirection character is > then the outputfile is created if it does not exist and truncated if it does. If the redirection token is >> then outputfile is created if it does not exist and appended to if it does. 4. The shell support background execution of programs. An ampersand (&) at the end of the command line indicates that the shell should return to the command line prompt immediately after launching that program.

近期下载者

相关文件


收藏者