Skip to content

🐚​ The goal of this project is for you to create a simple shell. Yes, your own little bash. You’ll learn a lot about processes and file descriptors.

Notifications You must be signed in to change notification settings

Daruuu/Minishell

 
 

Repository files navigation

Minishell Project

Developed by:

This project aims to create a functional shell that interprets and executes commands similar to Bash, meeting the fundamental requirements of 42 School.

Objective

The shell should provide an interactive experience, support essentially such as redirections and pipelines, and manage variables and signals, all with a focus on efficiency and memory management.

Structure of Different Lists Used in Minishell

The following diagram illustrates all the linked lists used in the project and how they are interconnected.

Program Flow in Minishell

Diagram showing the execution flow, from input processing to command execution and output handling.

Project Structure

The project includes a Makefile to simplify the compilation process files to ensure a clear, modular structure. Additionally, the documentation is stored in the docs folder for easy reference.

Key Folders and Files:

  • docs/: Contains documentation files, notes, and other useful documents.

  • src/: Contains the source code of the project, divided into functional folders:

    • built_ins_1/ and built_ins_2/: Handle internal commands like echo, cd, pwd, export, unset, etc.
    • commands/: Contains functions for handling command arguments and execution.
    • env/: Manages environment variables and their setup.
    • execute/: Responsible for executing commands, including handling pipes and redirections.
    • expand/: Handles variable and environment variable expansions.
    • free/: Manages memory freeing functions for various structures.
    • input/: Deals with input parsing and terminal interaction.
    • parser/: Contains functions for parsing input, managing quotes, and handling tokens.
    • redir/: Manages redirections, including input/output redirection and heredoc.
    • signals/: Handles signal management (e.g., Ctrl+C, Ctrl+D).
    • tokenize/: Responsible for tokenizing input and handling special characters.
  • libft/: Custom library used for string manipulation and other utility functions.

  • testing/: Contains test files and testing utilities, including scripts and Unity framework setup for unit tests.

Important Files:

  • Makefile: Automates the build process.
  • minishell.c: Main entry point for the shell program.
  • README.md: Provides an overview of the project, its functionality, and setup instructions.
  • Scripts: Different shell scripts to test the functionality of pipes in the shell.

About

🐚​ The goal of this project is for you to create a simple shell. Yes, your own little bash. You’ll learn a lot about processes and file descriptors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 80.8%
  • C++ 16.3%
  • Makefile 1.3%
  • Other 1.6%