dmbcalado / Minishell

Creating a small shell in C (similar to GNU Bash) using parallel processes, via forks. Pipes, redirections and parsing are the main focus, but we do construct some builtins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minishell (grade : 100)


https://user-images.githubusercontent.com/76601369/110706242-77158d00-81ef-11eb-8085-5da6f0988553.jpg

This project has the goal to create a replica of the GNU Bash Shell, that besides the required built in functions, runs and redirects every command in a child process (runs by executing execve() function).

The required builtin commands where:

  • env : We needed to extract the environment variables from the computer and create our own list, also increasing the $SHLVL every time we open a new minishell inside minishell.
  • export : export should let us include a new environment variable and handle it the same way as the GNU Bash.
  • unset : unset should let us erase an environment variable and handle it the same way as the GNU Bash (with full permissions).
  • cd : Should perform every cd operation.
  • pwd : Should perform the same way as pwd from GNU Bash.
  • exit : Enable the user to leave the shell and returning an exit code that would tell the error.

About

Creating a small shell in C (similar to GNU Bash) using parallel processes, via forks. Pipes, redirections and parsing are the main focus, but we do construct some builtins


Languages

Language:C 96.1%Language:Makefile 3.9%