- first enter your shell directory, confrim files are complete(shell.h, shell.c, utility.c, makefile and readme).
- Then use your Linux terminal, enter "make myshell", you can use "./myshell" to run this shell if successful.
- Of course, you can enter "make clean" to remove all object files.
- : only one parameter.
- [optional parameter]: parameter which may be omitted.
- ...: several parameters.
- (expression): expression.
- <type1|type2>: parameter can be type1 or type2.
- cd ...: change current working directory to the first directory if exists.
- dir ...: output information of specified directories.
- pwd: output information of current working directory.
- echo <string|variable> ...: output an ordinary string or a variable.
- clr: clear current displaying page.
- exit [status]: exit will status if exists, otherwise, exit with status 0.
- quit: exit with status 0.
- more ...: output contents full of displaying window size, use "q", "enter", "blank" to ctrl.
- help: provide help manuals processed by instruction "more".
- date: display current date and time.
- time : calculate time costing in the process.
- exec ...: execute commands.
- set: output all variables with format "a=b".
- unset : delete specified variable.
- environ: output all environment variables with format "a=b".
- bg : move job to background.
- fg : move job on the stage.
- jobs: output all jobs in background.
- kill : kill specified job.
- umask [n]: output mask value or set mask value.
- test [(expression)] (expression): test logical relation between expressions.
- atest [(expression)] (expression): output the value after testing.
- shift: move the parameter list to the left for one bit.
- continue: skip after commands.
- mv : move file from one directory to another.
- cp : copy file from one directory to another.
- touch ...: create new files if not exists.
- mkdir ...: create new directories if not exists.
- rm ...: delete files if exists.
- rmdir ...: delete directories if exists.
- history: output all previous commands.
- head [n] : display first n lines in file, set n as default value 10 if it omitted.
- tail [n] : display last n lines in file, set n as default value 10 if it omitted.
- myshell [ ...]: run batch file.
- external command will be executed by your original shell. Such as instructions "ls", "cat" and so on.
- emmmmm, here exists a problem not solved that some variables may be different.
- external command using external variables while internal commands using internal variables.
- when using this shell, ctrl+c are shielded.
- when a child process is called, ctrl+z can hang this process stopped.
- Arrows are not supported now.
- initial directory is your home directory in extern system.
- initial variables are empty.
- initial environment variables are "HOME", "PWD" and "shell".
- pipe supported, but no more than 10 pipes please.
- redirection supported, includeing '>', '>>' and '<'.
- symbol "&" supported, process will be moved to background.
- please enter your command separated with a blank strictly.
- instruction "umask" can only change the value of internal shell rather than extern shell.
- and so on.