style: README.md
This commit is contained in:
parent
cc6fe08855
commit
7cd721d0d2
29
README.md
29
README.md
|
@ -1,10 +1,10 @@
|
||||||
# Minishell
|
# Minishell
|
||||||
|
|
||||||
Laurent Fainsin
|
Laurent Fainsin \
|
||||||
1A, SN, 2020-2021
|
1A, SN, 2020-2021 \
|
||||||
note: 19.5/20
|
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,
|
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
|
avant son interprétation par le shell. Il propose une fonction `readcmd()` qui fournit
|
||||||
|
@ -34,11 +34,18 @@ Cette structure contient notamment :
|
||||||
|
|
||||||
**Exemples :**
|
**Exemples :**
|
||||||
|
|
||||||
- "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,
|
"ls -l" : seq[0][0] = "ls", seq[0][1] = "-l", seq[0][2] = NULL, seq[1] = NULL, backgrounded = NULL, in = NULL, out = 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,
|
```c
|
||||||
seq[2][0] = "wc", seq[0][1] = "-l", seq[0][2] = 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"
|
||||||
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 | 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
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue