Skip to content

Jst3r/msh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

235 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minishell

msh is a custom implementation of a Unix-like shell, created as part of the 42 curriculum.

Features

  • Command Execution: Executes absolute, relative, and PATH-resolved commands.

  • Built-in Commands:

  • echo (with -n option)

  • cd (with relative and absolute paths)

  • pwd

  • export

  • unset

  • env

  • exit

  • Redirections: Supports <, >, >>, and << (heredoc).

  • Pipes: Handles pipes (|) to connect commands.

  • Signals: Correctly handles Ctrl+C, Ctrl+D, and Ctrl+\ similar to bash.

  • Expansion: Handles environment variables ($) and quotes (single ' and double ").

Getting Started

Prerequisites

  • gcc
  • make
  • A Unix-based operating system (Debian/Arch Linux recommended)

Installation

  1. Clone the repository:
git clone https://github.com/Jst3r/msh.git
cd msh
  1. Compile the project:
make
  1. Run the shell:
./minishell

Usage

Once the shell is running, you can execute commands just like you would in bash:

$ ls -l | grep "c" > output.txt
$ export VAR="Hello World"
$ echo $VAR

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors