Skip to content

KutayKoray/kutish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

minishell

norminette

🐚 As beautiful as a shell.

About

minishell is a core project in the 42 curriculum that challenges students to recreate a simplified version of the Unix shell. The goal is to handle user input, parse commands, manage environment variables, and execute processes with proper redirections and piping.

🎯 Main Objectives

  • Reproduce basic shell behavior (bash, sh)
  • Implement a lexer and parser for shell syntax
  • Handle quotes, variable expansion ($VAR), and tilde expansion (~)
  • Manage pipes (|), redirections (>, <, >>, <<)
  • Support built-in commands (cd, echo, export, etc.)
  • Manage signals (e.g., Ctrl+C, Ctrl+D)
  • Ensure memory safety and leak-free execution

πŸ› οΈ Skills Gained

  • Low-level system programming with fork, execve, pipe, dup2, wait
  • Lexical analysis and parsing techniques
  • Process and file descriptor management
  • Signal handling and terminal control
  • Modular, clean, and maintainable C code under strict 42 norms

minishell builds a solid foundation for understanding how shells and operating systems work at a deeper level β€” preparing students for more complex projects.

References

Install & Usage (MacOS/Linux)

Prerequisites

minishell requires the GNU Readline library for command line editing and history.

apt install libreadline-dev # for deb based distros
dnf install readline-devel # for rpm based distros
brew install readline # for macOS

Installation

  1. Clone the repository recursively to include the libft submodule:
git clone --recursive https://github.com/KutayKoray/kutish.git
  1. Build the project:
make

Usage

Run the shell:

./minishell

or run with debug mode to see more verbose output:

./minishell -d

Ta-da! πŸ₯³
You now have a working shell that can execute commands, handle pipes, and manage redirections.

About

πŸšπŸ’» As beautiful as a shell

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •