Skip to content

GinaldoFT/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell cover

🐚 Minishell

minishell is a shell implementation project from the 42 curriculum.
It replicates the behavior of a simplified bash, handling command execution, pipes, redirections, environment variables, and builtins.

minishell badge


🎯 Project Objective

The goal of minishell is to implement a functional shell, learning the fundamentals of process creation, file descriptors, and terminal behavior, while respecting the exact bash-like behavior for many features.

You will:

  • Implement a parser for command input
  • Manage processes and file descriptors
  • Handle pipes (|) and redirections (>, <, >>, <<)
  • Support environment variable expansion ($HOME, $PATH, etc.)
  • Implement core builtins such as cd, echo, pwd, export, unset, env, and exit
  • Manage signals (Ctrl-C, Ctrl-D, Ctrl-\) correctly

🔧 Key Concepts

Concept Description
Process & Fork Creation and management of child processes
Execve System call to execute new programs
File Descriptors Handle input/output and redirections
Pipes Connect multiple commands together
Environment Vars Expand and manipulate shell variables
Signals Handle interrupts like Ctrl-C gracefully

⚙️ Project Rules

  • Must mimic bash behavior as closely as possible
  • Only allowed functions: a restricted set from libc and POSIX
  • Correct handling of memory (no leaks allowed)
  • Proper exit codes for each command

👥 Authors

About

minishell is a shell implementation project from the 42 curriculum.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •