minishell

OS Language Grade Status

Minishell

Minishell is a project from 42 Network. The goal of this project is to create a simple shell, with basic functions.

How to use

  • Clone the repository with git clone https://github.com/iLucasPires/minishell
  • Run make to compile the project
  • Run ./minishell to start the shell

Requirements

  • Readline library
  • C compiler (gcc or clang)
  • Make

Mandatory part

  • The executable must not quit unexpectedly (Segmentation fault, bus error, double free, etc).
  • The executable must respond to the following signals: Ctrl-C, Ctrl-\ and Ctrl-D.
  • You must show a prompt when waiting for a new command.
  • The prompt must be displayed again each time a command has been executed completely.
  • You must correctly handle the PATH and the environment (by copying and restoring the initial envp).
  • You must implement the following builtins: echo, cd, export, unset , env, exit, pwd.
  • You must implement the following redirections: <, >, >>.
  • You must implement the following pipes: |.

Bonus part

  • You must implement the following logical operators: &&, ||.
  • You must implement the wildcard: *.
  • You must implement the syntax of quotes: ’ and ”.

Example

Example

Example

TODO

  • better error handling
  • better performance
  • better code documentation
  • improve unit tests
  • improve bonus part
Visit original content creator repository https://github.com/iLucasPires/minishell

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *