Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

172 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell-badge

GitHub code size in bytes

Minishell

This project is about creating a simple shell. Yes, your own little bash. You will learn a lot about processes and file descriptors.

Overview

A minimal bash-like shell written in C, built as a pair project at 42 school with @natttttttttttttt.

Note

The actual team repository is natttttttttttttt/minishell — this is my personal copy.

Features

  • Interactive prompt with working history (readline)
  • Command execution via PATH, relative or absolute paths
  • Pipes (|)
  • Redirections: <, >, >> (append) and << (heredoc)
  • Environment variable expansion ($VAR, $?)
  • Single and double quote handling
  • Signal handling (ctrl-C, ctrl-D, ctrl-\)

Builtins

Command Description
echo With option -n
cd With relative or absolute path
pwd Print current working directory
export Set environment variables
unset Remove environment variables
env Print the environment
exit Exit the shell with a status

Usage

make
./minishell

Concepts Covered

  • Lexing, tokenization, and parsing
  • Processes: fork, execve, wait
  • File descriptors, pipes, and redirections
  • Signals and terminal behavior
  • Environment management

About

creating your own shell in C

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages