Skip to content

benmaia/42_Minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42_Minishell


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


This project is about creating a simple shell, YES, my own little bash. I've learn a lot about processes and file descriptors

This project is a recreation bash with some limitations

Install if you don't have readline installed

sudo apt-get install libreadline-dev

To use it:

git@github.com:benmaia/42_Minishell.git
cd 42_Minishell/minishell
make && ./minishell

  • The built-in functions where made by hand:

      echo && echo -n
      env
      export
      unset
      cd
      pwd
      exit with error code/values
  • Do the signals for prompt and block commands:

      CTRL C
      CTRL D
      CTRL \
  • As also have to run all the other commands with execve, have to handle multiple pipes an redirections and support running other programs, like the minishell itself.

    Have to launch absolute or relative commands, have to handle expansions of variables '$' and parsing the quotes.

    More info on the subject itself!! HERE

    Here is an example:


    Minishell OK ✅


    Grade: 96%