reparation de la suppression des fichiers crees, ajout possibilite entrer un fichier sans extension sh, recuperation automatique des fichiers dans dossier default

This commit is contained in:
hugogogo
2021-12-13 22:57:02 +01:00
parent e90244a868
commit 74da77d1e7
12 changed files with 676 additions and 44 deletions

View File

@@ -0,0 +1,74 @@
#
# EXPORT
#
export var
export var=test
export var ="cat Makefile | grep >"
export "test=ici"=coucou
export LOL=lala ROR=rara
export "HI= hi"
export "HI =hi"
#
# ECHO
#
echo
echo simple
echo -n simple
echo -n -n -nnnn -nnnnm
#
# PWD
#
pwd a
pwd a b c d
#
# CD
#
cd
pwd
cd .
pwd
cd ~
pwd
cd /
pwd
cd no_file
pwd
cd a b c d
pwd
cd $HOME/Documents
pwd
cd ../../../../../..
pwd
#
# EXIT
#
exit -10
exit +10

View File

@@ -0,0 +1,33 @@
#
# ENV
#
env
export
env
# display is different for both commands
env
export
env
#
# UNSET
#
export BLOU=
env
unset BLOU
env
unset LOL ROR
env
unset blablabla
env
export ""
env
unset ""
env

View File

@@ -0,0 +1,17 @@
echo $?
cat Makefile | grep pr | head -n 5 | cd test (mybin)
echo $?
cat Makefile | grep pr | head -n 5 | cat test (bin)
echo $?
cat Makefile | grep pr | head -n 5 | hello (NA)
echo $?
cat diufosgid
echo $?
exit
echo $?

View File

@@ -0,0 +1,52 @@
echo "bip | bip ; coyotte > < \" "
export vat=at
c$var Makefile
$blablabla
$LESS$VAR
echo '\'
echo "\"
echo "\\"
echo "\n \n \n"
echo "\n \\n \\\n"
echo hi";" hihi
echo hi " ; " hihi
echo "\s"
echo "\\s"
echo \>
echo "$HOME"
echo '$HOME'
echo \$HOME
export A="s -la"
l$A
export A=p
export B=w
$A"$B"d
"$A"'$B'd
echo "ls -la <a | grep x > b"
echo ok "" ok
echo ok "" "" "" "" "" "" "" "" "" ok
export OK="ok ok"
echo $OK

View File

@@ -0,0 +1,6 @@
#!/bin/bash
#cat << EOF
#hello
#EOF

48
tests/defaults/pipes.sh Normal file
View File

@@ -0,0 +1,48 @@
echo bonjour ; |
echo bonjour | |
|
echo bonjour |;
cat Makefile | grep pr | head -n 5 | cd test (mybin)
cat Makefile | grep pr | head -n 5 | cat test (bin)
cat Makefile | grep pr | head -n 5 | hello (NA)
cat | cat | cat | ls
echo hudifg d | | hugdfihd
echo |
| echo
sort | ls
exit 0 | exit 1
exit 1 | exit 0
cat < Makefile | grep gcc > output
ls
rm output
rm output
sleep 1 | exit
ls | cat
cat | ls
ulimit -n
ls /proc/self/fd
ls | ls | ls /proc/self/fd
ls | ls | ls | ls | ls | ls /proc/self/fd

View File

@@ -0,0 +1,100 @@
echo bonjour > $test
ls
rm '$test'
> log echo coucou
ls
rm log
cat < >
cat < <
cat > >
> a ls > b < Makefile
ls
rm a b
echo > a Hello World!
ls
rm a
> a echo Hello World!
ls
rm a
echo bonjour > test\ 1
ls
rm test
echo bonjour >>> test
echo bonjour > > out
ls
rm out
echo 2 >> out1 > out2
ls
rm out1 out2
echo 2 > out1 >> out2
ls
rm out1 out2
cat < blablabla
echo test > file test1
ls
rm file
not_cmd bonjour > salut
ls
rm salut
>testt
ls
rm testt
>>testt
ls
rm testt
<testt
ls
rm testt
touch testt
<testt
rm testt
rm testt
<testt
rm testt
cat <a <b >c >d
echo hello >a
echo byebye >b
cat <a <b >c >d
cat a
cat b
cat c
cat d
rm a b c d
cat a | < b cat | cat > c | cat
ls
rm a b c
echo hello >a
echo byebye >b
echo ouf >c
cat a | < b cat | cat > c | cat
ls
cat a
cat b
cat c
rm a b c