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.
- Host: GitHub
- URL: https://github.com/ruzafa8/minishell
- Owner: ruzafa8
- Created: 2023-03-31T15:13:19.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-21T22:05:26.000Z (about 2 years ago)
- Last Synced: 2025-08-22T11:51:42.178Z (10 months ago)
- Topics: 42, c, minishell, shell
- Language: C
- Homepage:
- Size: 221 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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
```