Skip to content

Minishell is a 42 school project that involves building a shell program from scratch. The program must be able to execute various shell commands, handle environment variables, and provide some basic shell functionality, such as pipes and redirects.

License

Notifications You must be signed in to change notification settings

iLucasPires/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Minishell is a 42 school project that involves building a shell program from scratch. The program must be able to execute various shell commands, handle environment variables, and provide some basic shell functionality, such as pipes and redirects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published