Files
42_SIDE_minishell_test/error.md
2021-12-17 11:56:46 +01:00

40 lines
772 B
Markdown

1. redirection & quotes expansion
```
bash$ echo "hello" > "file"
bash$ ls
file
bash$
```
```
minishell$ echo "hello" > "file"
minishell$ ls
'"file"'
minishell$
```
2. redirection & open
`prompt$ > newfile`
create file `newfile` in bash, but not in minishell
3. redirection & open
ok `prompt$ echo "hello" > $not_a_variable`
ok does'nt create a file in bash, but does in minishell
4. redirection & variables expansion
```
export NEWVAR="newfile"
echo hello > $NEWVAR
```
create file "newfile" in bash, but a file named "'$NEWVAR'" in minishell
5. redireciton & pipes
`ls | < not_a_file cat`
gives an error about "not_a_file" and stop in bash, but in minishell it continues forever
(`< not_a_file cat` works fine in both bash and minishell)