Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

697 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minishell - Command Parsing and Process Management

42 School: Rank 3

Minishell is a project about creating a simple custom UNIX shell in C, focusing on process control, file descriptor management, and command parsing.


Table of contents

Features · Usage · License · Study Notes



Features

  • Lexical analysis and tokenization of command-line input

  • Parsing and syntax interpretation for complex command structures, using an Abstract Syntax Tree (AST), represented as a binary tree

  • Process creation and management for command execution

  • Environment state management with variable expansion

  • Inter-process communication via pipes

  • Input/output redirection and here-document handling

  • Pattern matching for dynamic filename expansion (wildcards)

  • Conditional and grouped command execution with logical operators

  • Quoting support (single and double) for argument grouping and literal treatment of special characters

  • Signal handling for interactive session control

  • Robust error handling and resource management


Usage

Setup and compilation

  1. Clone repository

    git clone git@github.com:teresa-chow/42-minishell.git minishell
  2. Go inside project directory and run make

    cd minishell
    make
  3. Execute minishell program

    ./minishell

Testing

Test minishell against bash with tmux, while monitoring memleaks

make test


Team

Carlos Teixeira @Carlos688940

Teresa Chow (me)


License

This work is published under the terms of MIT License.


Study notes

Further reading : Wiki



⬆ back to top

About

Minishell is a project about creating a simple custom UNIX shell in C, focusing on process control, file descriptor management, and command parsing.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages