https://github.com/aurorasloan/minishell
A simple shell
https://github.com/aurorasloan/minishell
42born2code bash builtin-commands expansion minishell pipelines redirection shell signals
Last synced: about 2 months ago
JSON representation
A simple shell
- Host: GitHub
- URL: https://github.com/aurorasloan/minishell
- Owner: AuroraSloan
- Created: 2021-09-08T05:11:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-12T13:45:41.000Z (about 4 years ago)
- Last Synced: 2023-05-07T12:33:47.283Z (almost 3 years ago)
- Topics: 42born2code, bash, builtin-commands, expansion, minishell, pipelines, redirection, shell, signals
- Language: C
- Homepage:
- Size: 629 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# minishell
A simple shell.

This program was developed by [Yuta-Fujimoto](https://github.com/yuta-fujimoto) and [AuroraSloan](https://github.com/AuroraSloan)
## Features
### Simple commands
- Search and launch any executable in $PATH
### Builtin commands
|Command | Options / Arguments |
|----------|---------------------------|
|``echo`` | `-n` |
|``cd`` | relitvie or absolute path |
|``pwd`` | n/a |
|``export``| no options |
|``unset`` | no options |
|``env`` | n/a |
|``exit`` | no options |
### Expansion
- `'` inhibits all interpretions of a sequence of characters
- `"` inhibits all interpretation of a sequence of characters except for $
- Environment values expand to their values
- `$?` expands to the most recently executed foreground pipeline
### Redirection
- ``<`` redirects input
- ``>`` redirects output
- ``<<`` reads input from the current source until a linie containing only the delimiter is seen
- ``>>`` redirects output with append mode
### Piping
- The output of each command in the pipeline is connected via a pipe to the input of the next command
### Signals
- ``Ctrl-c`` prints a new prompt on a new line
- ``Ctrl-d`` exits the shell
- ``Ctrl-\`` does nothing
----
## Installation
```bash
git clone https://github.com/AuroraSloan/minishell.git
```
----
### Usage
First, create the executable with make
`make` - compiles the minishell executable
`make clean` - removes all object files
`make fclean` - removes all object files and the executable
`make re` - removes all object files and the executable before recompiling the program
In order to run the program, simply run the executable.
```bash
./minishell
```
To exit the program, you can use the builtin command ``exit`` or press ``Ctrl-d``.