Skip to content

Latest commit

Β 

History

209 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐚 minishell

A minimal Unix shell implementation written in C as part of the 42 School curriculum. This project recreates essential shell behavior such as command execution, pipes, redirections, and environment variable handling.


πŸ› οΈ How to Use

To compile, run it in terminal

make

then run

./minishell

πŸš€ Features

  • Custom interactive prompt using readline
  • Execution of commands via $PATH or absolute/relative paths
  • Built-in commands:
    • echo (with -n)
    • cd
    • pwd
    • export
    • unset
    • env
    • exit
  • Pipes (|)
  • Redirections:
    • Input <
    • Output >
    • Append >>
    • Here-document <<
  • Environment variable expansion ($VAR, $?)
  • Signal handling:
    • Ctrl-C β†’ new prompt
    • Ctrl-D β†’ exit shell
    • Ctrl-\ β†’ ignored

πŸ§ͺ Example commands

echo hello world
ls -l | grep minishell
cat < infile > outfile
echo $HOME
echo $?

Contributors

Danny: lexing, parsing, memory management, environment variable management, exit status

Ping: pipe, redirection, command execution, signal handling, exit status

About

Create a simple shell with all the basic functions mimicing bash

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages