Alicia-bites / minishell

This project is about creating a simple shell.
1 stars 0 forks source link

echo shouldn't be there #37

Closed Alicia-bites closed 2 years ago

Alicia-bites commented 2 years ago

BASH

amarchan@e1r5p22:~/Documents/test_env/env_bash$ >file2 echo > file1>file2>file1>>file2>file1 hey >file2 hola >file1
amarchan@e1r5p22:~/Documents/test_env/env_bash$ cat file1
hey hola
amarchan@e1r5p22:~/Documents/test_env/env_bash$ cat file2

MINISHELL

$: >file2 echo > file1>file2>file1>>file2>file1 hey >file2 hola >file1
$: cat file1
echo hey hola
$: cat file2

TOKENIZATION

index = 0
token = >
toktype = 11
-----------------------------------------
index = 1
token = bonjour
toktype = 15
-----------------------------------------
index = 2
token = echo
toktype = 1
-----------------------------------------
index = 3
token = >
toktype = 11
-----------------------------------------
index = 4
token = hola
toktype = 15
-----------------------------------------
index = 5
token = >
toktype = 11
-----------------------------------------
index = 6
token = bonjour
toktype = 15
-----------------------------------------
index = 7
token = >
toktype = 11
-----------------------------------------
index = 8
token = hola
toktype = 15
-----------------------------------------
index = 9
token = >>
toktype = 13
-----------------------------------------
index = 10
token = bonjour
toktype = 15
-----------------------------------------
index = 11
token = >
toktype = 11
-----------------------------------------
index = 12
token = hola
toktype = 15
-----------------------------------------
index = 13
token = hey
toktype = 4
-----------------------------------------
index = 14
token = >
toktype = 11
-----------------------------------------
index = 15
token = bonjour
toktype = 15
-----------------------------------------
index = 16
token = hola
toktype = 4
-----------------------------------------
index = 17
token = >
toktype = 11
-----------------------------------------
index = 18
token = hola
toktype = 15
-----------------------------------------
BarrierAntho commented 2 years ago

STATUS:

Fixed

COMMIT:

6bd1202abaf4607d67debabd94de06f75be25f95

REMARKS:

$: cd smb_test/
$: rm file1 file2
$: >file2 echo > file1>file2>file1>>file2>file1 hey >file2 hola >file1
$: cat file1
hey hola 
$: cat file2
$: echo

$: echo -n
$: echo -n Hola
Hola $: echo -n -nnnnnnnn -n < file1 Salut Alicia <file1 La BG
Salut Alicia La BG $: