Create my own version of linux Batch Shell.
This is an experimental application developed as part of the course "Operating Systems" assignment, that took place in the Department of Electrical & Computer Engineering at Aristotle University of Thessaloniki in 2018.
The goal is to create my version of linux Bash Shell. Where,
- cd, help and quit are handled as Built-In functions. For other functions type @function_name @arguments. If you need more info, type man @function_name.
- Improper space handle.
- Redirection with > handle.
- Redirection with < handle.
- Two modes supported:
- Interactive, when no arguments are given.
- Batch, when 1 (one) argument (file) is given.
- all, to make the object file,
- clean, to delete it.
- echo hello ; echo world ; echo true
- echo hello && echo world && echo true
- echo hello ; echo world && echo true
- eco hello && echo world ; echo true
- echo hello > file_1 > file_2 > file_3
- wc -l < file_1 < file_2 < file_3 if file_1, file_2, file_3 exists
- wc -l < file_1 > file_2 if file_1 exists
- Instruction(s) with piping ( | ). No error message, but the pipe symbol will be ignored.
- Instruction(s) with 3 or more sequentially ampersands. (i.e echo hello &&& echo world)
- Instruction(s) with 2 or more sequentially semicolons. (i.e echo hello ;; echo world)
- Instruction(s) with more than 512 characters.
- Other Build- In instruction(s) like: jobs, fg, bg etc.
- NULL commands, like:
- ;
- &&
- echo hello ; ; echo world
- echo hello && && echo world
Proper usage: echo hello > file
Improper usage: echo hello > 'file' or echo hello > "file"
PS_2. Maximum instructions = 250 (per line)
To execute the code, you first need to compile it using:
make all
and then run using:
./myshell [batchfile]
where the parameter is optional.
As of the completion of the project, it will NOT be maintained. By no means should it ever be considered stable or safe to use, as it may contain incomplete parts, critical bugs and security vulnerabilities.
Reach out to me: