A simple shell program to execute some commands,
and modern shell program's feature like pipe, process control, redirection...
$ mkdir obj bin
$ make
-
執行指令,例如
ls
,vim
-
執行一個指令並殺死他
sleep 10
and Ctrl+C -
重導向
ls -al > /tmp/x
cat /tmp/x
和cat < /etc/passwd
-
建立pipe
cat /etc/passwd | cat | less
-
process group
ps -o pid,sid,pgid,ppid,cmd | cat | cat | tr A-Z a-z
-
background process
python -m SimpleHTTPServer 8083 &
-
Ctrl+Z 暫停process
fg
喚醒processfg 1
喚醒特定processlsjob
列出process -
quit
exit
離開 -
xenv add LANG C
增加環境變數xenv rm LANG
移除環境變數 -
擴展特殊符
ls *
ls ???
ls ~
known bugs:
- 執行一個找不到的指令 有可能造成程式hang住