AShell

所属分类:Shell编程
开发工具:Unix_Linux
文件大小:29KB
下载次数:10
上传日期:2008-01-21 10:54:40
上 传 者yumu
说明:  这是一个shell的实现程序。其中System的实现参考了linux的。不好意思哈。
(This is a shell of the realization of the procedure. System in which the realization of the reference to linux. Sorry ha.)

文件列表:
myshell\myshell.txt (2252, 2007-09-18)
myshell\myshell.c (3443, 2007-09-20)
myshell\myshell0.c (4649, 2007-09-18)
myshell\makefile (324, 2007-09-20)
myshell\myshell.c~ (3391, 2007-09-20)
myshell\utility.o (7804, 2007-09-20)
myshell\myshell.h (2070, 2007-09-20)
myshell\utility.c (8823, 2007-09-20)
myshell\utility.c~ (8802, 2007-09-20)
myshell\myshell.h~ (2605, 2007-09-20)
myshell\myshell.o (3484, 2007-09-20)
myshell\myshell (13791, 2007-09-20)
myshell\batch.file (75, 2007-09-23)
myshell\makefile~ (319, 2007-09-20)
myshell\out.put (184, 2007-09-20)
myshell\createbatch.c (238, 2007-09-19)
myshell\ning.yu (132, 2007-09-20)
myshell\createbatch.c~ (233, 2007-09-19)
myshell\yu.ning (2297, 2007-09-20)
myshell\xx (7, 2007-09-20)
myshell\xxxx (253, 2007-09-20)
myshell\myshell.h0 (2605, 2007-09-20)
myshell\xxx (240, 2007-09-23)
myshell (0, 2007-09-23)

/*********************************************************************************************** This document is a readme file for myshell Program. Author: Ning Yu Email: ningyu@siu.edu Date: 09/19/2007 ************************************************************************************************/ DESCRIPTION The shell program which can complete almost all commands in linux. And the program finish all requirement of Project One. COMMANDS The following commands are reloaded and supported by this program. cd -The presents the linux folder. '.'and '..' are supported, too. Change the current default directory to . If is not present, report the currrent directory. At the same time, the error is reported in screen. clr -Clear the screen. dir -List all dirctories and files in . '.' and '..' are supported. '>' & '>>' are supported. environ -Show all the environment strings in the screen. '>' & '>>' are supported. echo -Echo the to screen followed by a new line. Multiple spaces/tabs can be reduced to a single space. '>' & '>>' are supported. help -Display the user manual readme file. '>' & '>>' are supported. pause -Pause current operaion of the shell until 'Enter' is pressed. quit -Quit the shell program. -Supported by the program. At the same time, 'The command is executed by /bin/shell' will be displayed in the screen. ENVIRONMENT STRINGS The environment strings, shell=/myshell and parent=/myshell, are created when the shell program is executed. I/O REDIRECTION The i/o redirection is supported by the program. The normal input/output in linux command line status depends on user's input and screen display, that is stdin/stdout. I/O rediction can make input from files and output to files. The program supports the '<','>' and '>>' to complete the i/o redirction operation. THE EXECUTION OF BATCH FILES (stdin redirection) The program supports the batch files. The batch file, batch.file, is created automaticaly when the shelll program. In the batch file, the following command is included: cd .. dir cd myshell echo 1234 567 8956 help > ning.yu environ >> ning.yu User can execute the following command line instead of simple 'myshell' command and press enter key in order to execute the batch file: {adm2pc4:~/myfiles/myshell}myshell < batch.file OUTPUT REDIRECTION 'dir', 'environ', 'echo' and 'help' can support the output redirection as the requirement of Project One. The example is the following: dir .. > outputfile environ > outputfile echo 1234 >> outputfile '>' represents that outputfile is created if it does not exist and truncated if it does. '>>' represents that outputfile is created if it does not exist and appended to outputfile if it does. AMPERSAND OPERATION (&) The shell program support the 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 the command. For exameple: dir .. & The command is executed in the background. And dir display is not showed in screen. Once the command is parsed, the command line prompt immediately shows. For example: User can execute the command: dir .. > output.file & to view executed result of the command 'dir ..' in output.file. COMMAND LINE PROMPT Contain the pathname of the current directory. If user executes dir .. , the prompt will be changed automatically.

近期下载者

相关文件


收藏者