Skip to content

[42 School - Rank 03] - minishell is a bash-inspired shell, featuring command interpretation, execution, pipes, redirections, and built-in commands.

Notifications You must be signed in to change notification settings

lgandarillas/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[Minishell | 42 School - Rank 03]

A shell inspired by bash, developed as part of the 42 curriculum. This shell interprets and executes commands, handles pipes and redirections, and includes a set of built-in commands.

This project was developed collaboratively by @alejandquintero and @lgandarillas.

Overview

Minishell is designed to:

  • Parse and execute commands with arguments.
  • Handle absolute, relative, and environment paths.
  • Provide support for pipes (|) and redirections (<, >, >>, <<).
  • Include environment variable handling ($VAR and $?).
  • Support interactive shell control with Ctrl-C, Ctrl-D, and Ctrl-\.

Minishell Demo

Setup and Usage

  1. Clone the repository and submodules

    git clone https://github.com/lgandarillas/minishell.git
    cd minishell
    git submodule update --init --remote libft_v2
    
  2. Install Dependecies

    sudo apt update
    sudo apt install libreadline-dev
  3. Compile the project:

    make
  4. Run the shell:

    ./minishell

Features

Built-in Commands

Minishell implements the following built-in functions directly without external executables:

  • echo, cd, pwd, export, unset, env, exit

Additional Features

  • Quoting: Supports single (') and double (") quotes for string handling.
  • History: Tracks command history during the session.
  • Signals: Handles Ctrl-C, Ctrl-D, and Ctrl-\ like bash.
  • Environment Variables: Expands $VAR and includes support for $? (last exit status).

About

[42 School - Rank 03] - minishell is a bash-inspired shell, featuring command interpretation, execution, pipes, redirections, and built-in commands.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published