faboussard / 42_minishell

1 stars 0 forks source link

tests #10

Closed faboussard closed 5 months ago

faboussard commented 6 months ago
melobern commented 6 months ago
melobern commented 5 months ago

### Voir les priorités selon les droits et l'existence des fichiers

PROMPT~/$ echo < cat > lala bash: cat: No such file or directory PROMPT~/$ echo > cat < lala bash: lala: No such file or directory
PROMPT~/$ < cat < prout < ole > coucou bash: prout: No such file or directory PROMPT~/$ cat coucou cat: coucou: No such file or directory PROMPT~/$ cat < cat < prout < ole > coucou bash: prout: No such file or directory PROMPT~/$ ls cat CMakeLists.txt ignore_leaks.supp IN includes info.txt libft Makefile minishell OUT questions srcs test tests.txt PROMPT~/$ echo chat > cat PROMPT~/$ cat cat chat PROMPT~/$ cat < cat < prout < ole > coucou | ls bash: prout: No such file or directory cat CMakeLists.txt ignore_leaks.supp IN includes info.txt libft Makefile minishell OUT questions srcs test tests.txt PROMPT~/$ cat < cat < prout < ole > coucou ls bash: prout: No such file or directory PROMPT~/$ ls < cat < prout < ole > coucou ls bash: prout: No such file or directory PROMPT~/$ chmod 000 cat PROMPT~/$ ls < cat < prout < ole > coucou ls bash: cat: Permission denied PROMPT~/$ ls < cat < prout < ole > coucou | ls bash: cat: Permission denied cat CMakeLists.txt ignore_leaks.supp IN includes info.txt libft Makefile minishell OUT questions srcs test tests.txt PROMPT~/$ ls < cat < prout < ole > coucou > cat bash: cat: Permission denied PROMPT~/$ ls < prout < ole > coucou > cat bash: prout: No such file or directory PROMPT~/$ ls < ole > coucou > cat bash: ole: No such file or directory PROMPT~/$ ls > coucou > cat bash: cat: Permission denied PROMPT~/$ cat > coucou > cat < .build/ coucou .gitignore includes/ Makefile questions tests.txt
cat .git/ ignore_leaks.supp info.txt minishell srcs/ .vscode/
CMakeLists.txt .github/ IN libft/ OUT test
PROMPT~/$ cat > coucou > cat < coucou bash: cat: Permission denied PROMPT~/$ cat > coucou > cat > OUOU< coucou bash: cat: Permission denied PROMPT~/$ ls cat CMakeLists.txt coucou ignore_leaks.supp IN includes info.txt libft Makefile minishell OUT questions srcs test tests.txt PROMPT~/$ cat OUOU cat: OUOU: No such file or directory PROMPT~/$ cat > coucou > OUOUHOU > cat > OUOU< coucou bash: cat: Permission denied PROMPT~/$ ls cat CMakeLists.txt coucou ignore_leaks.supp IN includes info.txt libft Makefile minishell OUOUHOU OUT questions srcs test tests.txt PROMPT~/$ cat OUOUHOU PROMPT~/$ < cat cat > coucou > PROUT > cat > OUOU< coucou bash: cat: Permission denied PROMPT~/$ ls cat CMakeLists.txt coucou ignore_leaks.supp IN includes info.txt libft Makefile minishell OUOUHOU OUT questions srcs test tests.txt

melobern commented 5 months ago

### HEREDOC + SYNTAX ERROR

ls | cat << stop | ls -la | cat << stop1 | ls | cat << stop2 | <<stop3 ls -la > > out | cat << stop3

BASH:~/$ ls < < | << stop
bash: syntax error near unexpected token `<'
BASH:~/$ << stop | ls < < 
bash: syntax error near unexpected token `<'
> stop
BASH:~/$ << stop | ls < < | << coucou | ls < <
bash: syntax error near unexpected token `<'
> stop
BASH:~/$ ls < < | << stop
bash: syntax error near unexpected token `<'
BASH:~/$