Alicia-bites / minishell

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

echo hola > bonjour $> echo que tal >> bonjour $> cat < bonjour #25

Closed Alicia-bites closed 2 years ago

Alicia-bites commented 2 years ago

echo hola > bonjour $> echo que tal >> bonjour $> cat < bonjour

bash: give the prompt back

minishell: Error: file: srcs/cmd/cmd_check_tok_lst_redir.c message: no file after redirection

BarrierAntho commented 2 years ago

This is totally normal because the $ from $> seems expanded and the > seems to be tokenized as redirection. But following token after that are tokenized to something else than a file. Then the token security is working well. Be careful during your test phase because $> represents a new line of command and not a command in the the command line itself.

Alicia-bites commented 2 years ago

The $ isn't expanded