Skip to content

Light bash reproduction for a 42 school project

License

Notifications You must be signed in to change notification settings

Lobbyra/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minishell - @42Born2code


Introduction

Minishell is a group project at 42. The goal of this project is to create a simple shell that behave like bash.

This project was carried out by Jecaudal and Jereligi

Subject

We based on bash behavior.

Rules of project

implement the following builtins:

  • echo and the -n option
  • cd only with an absolute or relative path
  • pwd without any options
  • export without any options
  • unset without any options
  • env without any options or arguments
  • exit without any options

The function to be implemented in the project

  • Display a prompt while waiting for a new order.
  • Find and launch the correct executable (based on a PATH environment variable or using an absolute path).
  • ; in the command line must separate the commands.
  • and " must work as in bash, except multiline.
  • The <,> and >> redirects must work as in bash, except for aggregations of fd.
  • Pipes redirections |.
  • The environment variables ($ followed by characters) must work.
  • $? variable.
  • ctrl-C, ctrl-D and ctrl- \ signals should have the same behavior.

This project is coded in C with our proper norm at 42.

Project duration : 4 weeks

Installation 🖥

Run the Makefile with the make command to compile all the files

Then run the executable ./minishell

minishell[/Users/user42/Desktop/minishell]$>

Tips project

⚠️ Warning: Don't copy/paste code you don't understand: it's bad for you, and for the school. I have put my login in a lot of files to encourage you doing your own version. Have fun !

  • Know and test your shell very well !
  • Organize and structure your project

Project documentation 📚

bash reference manual

Contributing, Questions or suggestions ?

42Slack : @jecaudal or @jereligi

42Intra : @jecaudal or @jereligi

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

Thanks for reading this read me, advice or corrections are welcome

About

Light bash reproduction for a 42 school project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published