Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

196 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Minishell is a team project developed at 42 with my partner https://github.com/marine-i. The objective is to create a minimal Unix shell in C, reproducing the core behavior of bash.

This project focuses on understanding how a shell works internally, including process creation, command parsing, execution, and signal handling.


Features

  • Execution of external commands

  • Built-in commands

  • Pipes (|)

  • Redirections:

    • Input (<)
    • Output (>)
    • Append (>>)
    • Heredoc (<<)
  • Environment variable management

  • Exit status handling

  • Signal handling (Ctrl-C, Ctrl-D, Ctrl-\)

  • Bash-like behavior (as required by the subject)


Built-in Commands

Minishell implements the following built-ins:

  • echo (with -n)
  • cd
  • pwd
  • export
  • unset
  • env
  • exit

Compilation

To compile the project, run:

make

This will generate the minishell executable.


Usage

Launch the shell with:

./minishell

You can then execute commands as you would in bash.


Project Structure

  • Parsing and tokenization of user input
  • Execution management
  • Built-in commands
  • Signal handling
  • Environment variables
  • Memory management

(All implemented following the constraints of the 42 subject.)


Technologies

  • Language: C
  • System calls: fork, execve, pipe, dup2, wait, signal, etc.
  • Libraries: standard C library and allowed 42 functions

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages