cshell is an implementation of the original UNIX shell in C. It uses the POSIX API to implement a lot of the same functionality of Ken Thompson's first shell. The API calls predominantly used are read
, write
, fork
, exec
, and wait
to name a few.
-
Ubuntu 14.04 LTS - Operating system reqd.
-
GCC 4.8.4 - Compiler used
-
Must have
git
installed -
Must have repository cloned
$ sudo apt-get install git
Clone the repository into a new directory
$ git clone https://github.com/BennettDixon/simple_shell.git
Compile with the following:
gcc -Wall -Werror -Wextra -pedantic *.c -o seashell
Using $PATH
to find custom commands (executables)
> echo dog
dog
> /bin/echo dog
dog
Using &&
or ||
logic to run commands based on success
> ls -l /asdfasdf && echo this won't print!
ls: cannot access /asdfasdf: No such file or directory
> ls -l /asdfasdf || echo this will print!
ls: cannot access /asdfasdf: No such file or directory
this will print!
Using ;
to seperate commands and run regardless of success
> ls -l /asdfasdf ; echo printme! ; wc -l main.c
ls: cannot access /asdfasdf: No such file or directory
printme!
21 316 main.c
Using exit [status]
to exit the process with status number
> exit 102
vagrant@vagrant-ubuntu-trusty-64:~/simple_shell$ echo $?
102
Using env
to print the environmental variables
> env
XDG_SESSION_ID=30
TERM=ansi
SHELL=/home/vagrant/simple_shell/seashell
...
...
Strictly followed Betty
style guide. To install
$ git clone https://github.com/holbertonschool/Betty.git
$ cd Betty; ./install.sh
- 0.1.0
-
Connor Brereton - @ConnorBrereton
-
Bennett Dixon - @BennettDixon
This project is licensed under the MIT License - see the LICENSE.md file for details
- Bennett Dixon (for being a wizard)
- Holberton School (providing guidance)
- Stack Overflow (help on various memory errors (not leaks))