style: README.md

This commit is contained in:
Laureηt 2021-11-06 13:15:53 +01:00
parent cc6fe08855
commit 7cd721d0d2
No known key found for this signature in database
GPG key ID: D88C6B294FD40994

View file

@ -1,10 +1,10 @@
# Minishell
Laurent Fainsin
1A, SN, 2020-2021
Laurent Fainsin \
1A, SN, 2020-2021 \
note: 19.5/20
## Introduction
## Introduction du sujet
Le code fourni a pour but de vous décharger du travail d'analyse d'une ligne de commande,
avant son interprétation par le shell. Il propose une fonction `readcmd()` qui fournit
@ -34,11 +34,18 @@ Cette structure contient notamment :
**Exemples :**
- "ls -l" : seq[0][0] = "ls", seq[0][1] = "-l", seq[0][2] = NULL, seq[1] = NULL, backgrounded = NULL, in = NULL, out = NULL
- "ls -l > toto" : seq[0][0] = "ls", seq[0][1] = "-l", seq[0][2] = NULL,
seq[1] = NULL, backgrounded = NULL, in = NULL, out => "toto"
- "ls | grep toto | wc -l" : seq[0][0] = "ls", seq[0][1] = NULL,
seq[1][0] = "grep", seq[1][1] = "toto", seq[1][2] = NULL,
seq[2][0] = "wc", seq[0][1] = "-l", seq[0][2] = NULL,
seq[3] = NULL, backgrounded = NULL, in = NULL, out = NULL
- "sleep 100 &" : seq[0][0] = "sleep", seq[0][1] = "20", backgrounded != NULL, in = NULL, out = NULL
```c
"ls -l" : seq[0][0] = "ls", seq[0][1] = "-l", seq[0][2] = NULL, seq[1] = NULL, backgrounded = NULL, in = NULL, out = NULL
```
```c
"ls -l > toto" : seq[0][0] = "ls", seq[0][1] = "-l", seq[0][2] = NULL, seq[1] = NULL, backgrounded = NULL, in = NULL, out => "toto"
```
```c
"ls | grep toto | wc -l" : seq[0][0] = "ls", seq[0][1] = NULL, seq[1][0] = "grep", seq[1][1] = "toto", seq[1][2] = NULL, seq[2][0] = "wc", seq[0][1] = "-l", seq[0][2] = NULL, seq[3] = NULL, backgrounded = NULL, in = NULL, out = NULL
```
```c
"sleep 100 &" : seq[0][0] = "sleep", seq[0][1] = "20", backgrounded != NULL, in = NULL, out = NULL
```