Skip to content

MatriX1232/minishell

Repository files navigation

Minishell

GitHub repo size GitHub contributors GitHub stars GitHub forks Platform Language License

Minishell is a simple shell implementation project created as part of the 42 school curriculum. This project involves building a minimal, functional shell with a subset of features found in common UNIX shells like bash or zsh.

Table of Contents

Overview

Minishell is designed to mimic the behavior of the Bash shell, allowing users to interact with the command line, execute commands, and manage environment variables. The goal is to develop a deeper understanding of process management, pipes, redirection, and UNIX signals.

Features

  • Interactive prompt where users can type commands.
  • Supports simple command execution and command chaining with pipes (|).
  • Input/output redirection (>, >>, <).
  • Signal handling for Ctrl+C, Ctrl+D, and Ctrl+\.
  • Environment variable management with export, unset, etc.
  • Built-in commands like cd, pwd, echo, and more.
  • Error handling for command not found or invalid syntax.

Installation

To build and run the minishell, follow these steps:

  1. Clone the repository:
git clone https://github.com/MatriX1232/minishell.git
  1. Navigate to the project directory:
cd minishell
  1. Build the project:
make
  1. Run the shell:
./minishell

Usage

Once the shell is running, you will be presented with a prompt where you can type and execute commands. You can use both built-in commands and external programs.

^_^  minishell ▶ pwd
/home/msolinsk/42Warsaw/Core_Curriculum/minishell
^_^  minishell ▶ export MY_VAR=HELL
^_^  minishell ▶ echo "Welcome to programming $MY_VAR."
Welcome to programming HELL.
^_^  minishell ▶ ls
LICENSE  Makefile  include  libft  minishell  src
^_^  minishell ▶ unset
>︿< minishell ▶ Usage: unset <variable>
^_^  minishell ▶

Exiting the Shell You can exit the minishell by typing exit or using Ctrl+D.

Credits

This project was developed as an group project in colaboration with idomagal

About

This is project from 42School called minishell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors