From 7cd721d0d20ee9bca2dbe1e1d1c2530c0871bc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Sat, 6 Nov 2021 13:15:53 +0100 Subject: [PATCH] style: README.md --- README.md | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a02ee92..3f46883 100755 --- a/README.md +++ b/README.md @@ -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 +```