resolu erreur suppression fichiers entre bash et minishell

This commit is contained in:
hugogogo
2021-12-15 21:01:26 +01:00
parent 8b6af1ec47
commit cc53beabcf
3 changed files with 100 additions and 0 deletions

View File

@@ -110,99 +110,195 @@ exit 55 99
echo \poep
echo \1
echo 123\!456
echo 123\456
echo \a
echo \b
echo \c
echo \d
echo \e
echo \!
echo \"
echo \#
echo \$
echo \%
echo \&
echo \'
echo \(
echo \)
echo \*
echo \+
echo \,
echo \-
echo \.
echo \/
echo \0
echo \1
echo \2
echo \3
echo \4
echo \5
echo \6
echo \7
echo \8
echo \9
echo \:
echo \=
echo \?
echo \@
echo \A
echo \B
echo \C
echo \D
echo \E
echo \F
echo \G
echo \H
echo \I
echo \J
echo \K
echo \L
echo \M
echo \N
echo \O
echo \P
echo \Q
echo \R
echo \S
echo \T
echo \U
echo \V
echo \W
echo \X
echo \Y
echo \Z
echo \[
echo \\
echo \]
echo \^
echo \_
echo \a
echo \b
echo \c
echo \d
echo \e
echo \f
echo \g
echo \h
echo \i
echo \j
echo \k
echo \l
echo \m
echo \n
echo \o
echo \p
echo \q
echo \r
echo \s
echo \t
echo \u
echo \v
echo \w
echo \x
echo \y
echo \z
echo \{
echo \}
echo \~

View File

@@ -142,6 +142,8 @@ echo hallo >file1 >file2
cat file1 file2
echo hallo >file1 >file2 maran
cat file1 file2 file3
echo hallo >file1 >file2 >>file3 maran
cat file1 file2 file3

View File

@@ -144,7 +144,9 @@ cd $(dirname $0)
{
# execute commands in bash, and logs results
bash_execution=$( echo "$@" | bash 2>/dev/null )
delete_files
minishell_execution=$( echo "$@" | ./minishell 2>/dev/null )
delete_files
#compare output
if [ "$bash_execution" = "$minishell_execution" ]