Skip to content

Minishell is a 42 school project where we build a simple shell program that mimics basic functionalities of a real shell, handling commands, pipes, and signals.

Notifications You must be signed in to change notification settings

mathisdev7/42-Minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell

Final Score

Project Description

The minishell project is a simple Unix shell implementation developed as part of the 42 School curriculum. It allows users to execute commands, manage processes, and handle input/output redirection. This project emphasizes understanding shell functionalities, process management, and memory handling in C.

Journey

This project was a significant learning experience, requiring multiple iterations to achieve a fully functional shell. My initial attempts faced challenges with command parsing and process execution. However, through persistent debugging and testing, I was able to refine my implementation and create a robust shell environment.

Key Learnings

  • Understanding shell architecture and command execution
  • Implementing process management and handling signals
  • Managing input/output redirection and pipes
  • Memory management and dynamic memory allocation in C
  • Debugging and optimizing shell performance

Technical Details

  • The shell supports basic command execution, including built-in commands like cd, echo, pwd, export, unset, and exit.
  • Key features include:
    • Command parsing with support for pipes and redirections.
    • Environment variable management.
    • Signal handling for user interruptions (e.g., Ctrl+C).
  • The shell is designed to be user-friendly, providing clear prompts and error messages.

Project Status

  • First Attempt: Success (Fully Functional Shell)
  • Completion Time: ~12 days

Challenges Faced

The most challenging aspects of this project included:

  • Designing a robust command parser that handles various input formats.
  • Implementing process management and ensuring proper execution of commands.
  • Debugging issues related to memory leaks and resource management.
  • Ensuring smooth handling of signals and user interactions.

Reflection

While this project was one of the more complex ones at 42, it significantly enhanced my understanding of Unix systems and shell programming. The iterative process of refining my approach taught me the importance of thorough testing and debugging in creating a reliable shell environment.

Skills Developed

  • Shell architecture and command execution
  • Process management and signal handling
  • Input/output redirection and pipes
  • Memory management
  • Debugging and performance optimization

About

Minishell is a 42 school project where we build a simple shell program that mimics basic functionalities of a real shell, handling commands, pipes, and signals.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published