Skip to content

xnum/XnShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unix prog. hw3

Introduction

A simple shell program to execute some commands,

and modern shell program's feature like pipe, process control, redirection...

Build

$ mkdir obj bin

$ make

Usage

  1. 執行指令,例如lsvim

  2. 執行一個指令並殺死他sleep 10 and Ctrl+C

  3. 重導向ls -al > /tmp/x cat /tmp/xcat < /etc/passwd

  4. 建立pipe cat /etc/passwd | cat | less

  5. process group ps -o pid,sid,pgid,ppid,cmd | cat | cat | tr A-Z a-z

  6. background process python -m SimpleHTTPServer 8083 &

  7. Ctrl+Z 暫停process fg喚醒process fg 1喚醒特定process lsjob列出process

  8. quit exit 離開

  9. xenv add LANG C 增加環境變數 xenv rm LANG 移除環境變數

  10. 擴展特殊符 ls * ls ??? ls ~

known bugs:

  1. 執行一個找不到的指令 有可能造成程式hang住

About

*nix shell implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published