Skip to content

Minishell is an educational project implementing a minimal shell in C, inspired by bash. It supports running external programs, pipes, redirections, heredoc, environment variables, and built-in commands (echo, cd, pwd, export, unset, env, exit). Minishell handles user input parsing, signal processing, command history, and memory management.

License

Notifications You must be signed in to change notification settings

Davhak2/Minishell

Repository files navigation

minishell

Minishell is a minimalist shell implementation in C, created for educational purposes. The project supports basic features of a bash-like shell.

Features

  • Execute external programs with arguments
  • Built-in commands: echo, cd, pwd, export, unset, env, exit
  • Support for pipes (|) and redirections (>, <, >>, <<)
  • Heredoc (<<)
  • Environment variables (export, modify, unset)
  • Signal handling (Ctrl+C, Ctrl+D)
  • Command history (via readline)
  • Proper memory management

Build

Requires GNU Make, a C compiler, and the readline library.

make

Run

./minishell

Project Structure

Usage

Type commands as in a regular shell:

echo Hello, World!
export VAR=42
echo $VAR
ls -l | grep minishell > result.txt
cat << EOF
multi-line
heredoc
EOF

License

For educational use only.

About

Minishell is an educational project implementing a minimal shell in C, inspired by bash. It supports running external programs, pipes, redirections, heredoc, environment variables, and built-in commands (echo, cd, pwd, export, unset, env, exit). Minishell handles user input parsing, signal processing, command history, and memory management.

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •