NataliaMedeiros / minishell

0 stars 0 forks source link

Split commands #21

Closed NataliaMedeiros closed 1 month ago

NataliaMedeiros commented 1 month ago

Description: When the line command is splited in commands it just consider the operator to make the split, for example: echo hello > out.txt | cat -> will be splited as echo hello / > / out.txt / | / cat. What is correct, however if I had: echo "hello > out.txt | cat" it will be splited the same way, what is incorrect, since everything insede the double quotes is the argument of echo command.

My initial idea to solve that is change the way I split the command and start to consider if it has double quotes or not, and do not split operators that are inside the double quotes.