Skip to content

Minishell is a simplified version of a Unix shell. It's porpuse is to replicates basic shell behavior.

Notifications You must be signed in to change notification settings

jose5556/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖥️ Minishell

Code bytes Code language Top language Last commit

💡 About the project

Minishell is a project completed during my studies at School 42. The objective of this project is to create a simple shell that replicates the basic functionalities of a Unix shell, handling command execution, redirections, pipes, environment variables, and more.

🔍 Overview

Minishell is a very small version of Bash, built from scratch in C. It features a command-line interface where users can execute built-in commands, external programs, and handle input/output redirections. The project also includes signal handling for process control.

🛠️ Usage

Requirements

The project is written in C and requires the cc compiler and the readline library.

Instructions

  1. Compiling the program

To compile Minishell, run the following command in the project directory:

$ make
  1. Running Minishell

After compiling, start the shell by running:

$ ./minishell

You will then enter an interactive shell session where you can execute commands like:

$ echo "Hello, world!"
$ Hello, world!

$ ls -l | grep .c > files.txt
  1. Built-in Commands Minishell supports:

    echo (with -n option)

    cd (change directory)

    pwd (print working directory)

    export (set environment variables)

    unset (remove environment variables)

    env (print all environment variables)

    exit (exit the shell)

📌 Note

This project requires the readline library. If, for some unknown reason, an error occurs while compiling, you can resolve it with the following command:

$ sudo apt-get install libreadline-dev

About

Minishell is a simplified version of a Unix shell. It's porpuse is to replicates basic shell behavior.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published