Skip to content

A functional replica of the Bash shell developed in C. Focuses on system calls, file descriptors, and robust error handling.

Notifications You must be signed in to change notification settings

eschencode/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

509 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minishell (msh$)

minishell

Welcome to our Minishell project, developed as part of the curriculum at 42 Berlin. This project aims to build a simple shell (command interpreter) in C, mirroring the basic functionalities of bash. By implementing Minishell, we delved deep into the workings of a Unix shell, processes, file descriptors, and environment variables, enhancing our understanding of system calls and C programming.

Features

  • Command Execution: Executes commands found in the PATH.
  • Builtin Commands: Includes echo, cd, pwd, export, unset, env, and exit as built-in functions.
  • Redirections and Pipes: Handles input/output redirections (<, >, >>) and pipes (|).
  • Environment Variables: Supports setting and expanding environment variables ($VAR_NAME).
  • Error Handling: Provides meaningful error messages, mirroring those from bash.
  • Signal Handling: Manages signals like CTRL-C to interrupt commands, CTRL-D to exit the shell, and CTRL-\ to ignore.

Installation and Usage

Clone the repository and build the Minishell executable:

git clone https://github.com/eschencode/minishell.git
cd Minishell
make

To run Minishell, execute:

./minishell

About

A functional replica of the Bash shell developed in C. Focuses on system calls, file descriptors, and robust error handling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •