An open API service indexing awesome lists of open source software.

https://github.com/ruzafa8/minishell

A simple Unix shell implementation in C. Supports basic commands, piping, redirection, and signal handling. Ideal for learning shell scripting and process management. It's a 42 School Project.
https://github.com/ruzafa8/minishell

42 c minishell shell

Last synced: 2 months ago
JSON representation

A simple Unix shell implementation in C. Supports basic commands, piping, redirection, and signal handling. Ideal for learning shell scripting and process management. It's a 42 School Project.

Awesome Lists containing this project

README

          

# Minishell

A simple Unix shell implementation in C. This project supports basic commands, piping, redirection, and signal handling. It's an ideal project for learning shell scripting and process management.

## Features

- Execute basic Unix commands
- Handle command piping (`|`)
- Support for input and output redirection (`<`, `>`, `>>`)
- Support for heredoc (`<<`)
- Signal handling (e.g., `Ctrl+C`)
- Simple history of command
- Built-ins such as `cd`. `pwd`. `env`, `export`, `unset`, ...

## Getting Started

### Prerequisites

- GCC (GNU Compiler Collection)
- Make

### Installation

Clone the repository:

```sh
git clone https://github.com/ruzafa8/minishell.git
cd minishell
```

Compile the minishell:

```sh
make
```

### Usage

Run the minishell:

```sh
./minishell
```

### Examples

- Running a basic command:

```sh
minishell$ ls -l
```

- Using command piping:

```sh
minishell$ ls -l | grep minishell
```

- Redirecting output to a file:

```sh
minishell$ echo "Hello, World!" > hello.txt
```