$make -f mf.mk
$./shell
.
├── include
│ ├── cd.h
│ ├── echo.h
│ ├── printwd.h
│ ├── execute.h
│ ├── ls.h
│ ├── gvars.h
│ ├── colors.h
│ ├── sighan.c
│ ├── replay.c
│ ├── myutils.c
│ ├── procll.c
│ ├── sig.c
│ ├── bg.c
│ ├── fg.c
│ ├── jobs.c
│ └── pinfo.h
│
├── README.md
│
├── mf.mk - make file
│
├── obj
│
└── src
├── cd.c
├── colors.c
├── echo.c
├── execute.c
├── ls.c
├── pinfo.c
├── printwd.c
├── shell.c
├── sighan.c
├── replay.c
├── myutils.c
├── procll.c
├── sig.c
├── bg.c
├── fg.c
├── jobs.c
└── pinfo.c
- shell.c - contains program loop, tokenizes string.
- execute.c - handles redirects, calls necessary functions for commands.
- cd - change working directory
cd <path> - ls - list items in directory
ls -<tags?> <path?> - printwd - print working directory
pwd - pinfo - displays info of a process
pinfo <pin?> - echo - tokenizes string by space or tabs
echo <String> - bg - changes status of bg process to running
bg <job_no> - fg - brings bg process to fg
fg <job_no> - jobs - displays bg processes
jobs -<tags> - sig - sends signal to job
sig <job_no> <sig> - replay - replays a command after intervals for period
replay -command <command> -internal <interval> -period <period> - colors.c - colour formatting functions.
- procll - functions for process linked list.
- sighan.c - contains signal handlers.
- gvars.h - contains global variables
- myutils - utility functions
- Max length of line = 128 characters. Note : line is not the same as command. A line may have multiple commands seperated by a ';'.
- Max. number of words per command = 16
- Max Address Length = 64
- Redirection tokens have to be seperated by a space eg : sort< text1.txt (INVALID) sort < text1.txt (VALID)
- General format of redirects : CMD1 < FILE | CMD2 | .... | CMDN >> CMDN+1
Note : There might be some formatting differences from what bash(or similar) shells might display. Please consider this.