42_minishell/README.md

40 lines
1.6 KiB
Markdown
Raw Normal View History

2023-03-27 10:38:13 -04:00
# Minishell
2023-03-24 10:47:06 -04:00
2023-03-27 10:38:13 -04:00
Minishell is a 42 School project that involves creating a minimalistic shell in C language. The shell should be able to handle basic commands, manage environment variables and implement several built-in functions.
2023-03-24 10:30:25 -04:00
2023-03-27 10:38:13 -04:00
## Features
2023-03-24 10:30:25 -04:00
2023-03-27 10:38:13 -04:00
- Prompt management (display, editing, history)
- Command execution (with or without arguments)
- Basic shell operations (pipes, redirections)
- Environment variables management (listing, setting, unsetting)
- Built-in functions management (echo, cd, env, exit, export, pwd, unset)
2023-03-24 10:30:25 -04:00
2023-03-27 10:38:13 -04:00
## Getting started
2023-03-24 10:30:25 -04:00
2023-03-27 10:38:13 -04:00
1. Clone this repository: `git clone https://github.com/<your_username>/minishell.git`
2. `cd` into the cloned directory: `cd minishell`
3. Run the `make` command to compile the program: `make`
4. Start the shell by running the executable: `./minishell`
2023-03-24 10:47:06 -04:00
2023-03-27 10:38:13 -04:00
## Usage
2023-03-24 10:47:06 -04:00
2023-03-27 10:38:13 -04:00
Once the shell is started, you can enter commands as you would with any other shell. The following are some examples of commands that can be executed:
2023-03-24 10:47:06 -04:00
2023-03-27 10:38:13 -04:00
- Display the working directory: `pwd`
- Change directory: `cd <directory_name>`
- Print the value of an environment variable: `echo $<variable_name>`
- Set an environment variable: `export <variable_name>=<value>`
- Unset an environment variable: `unset <variable_name>`
- Display a list of environment variables: `env`
- Exit the shell: `exit`
## Resources
- ![The project subject](./subject.pdf)
- The C library documentation for the standard library functions used in the program
- bash man
## Authors
2023-03-28 09:37:24 -04:00
This project was created by [Camille CHAUVET](mailto:camille@chauvet.pro) and [Xamora](mailto:ogame.xamora@42l.fr). If you have any questions or suggestions, feel free to contact us.