Closed jyw2671 closed 3 years ago
bash-3.2$ ls | error | echo test > file && cat file
test
bash-3.2$ ls | echo test > file | error && cat file
bash-3.2$
ls | grep l | grep m > file
pipe 다음에 오는 redirection 처리 수정 필요
minishell>ls | grep l | grep m > file
{
PIPE
left->
{
cmd -> "ls"
args ->
}
right->
{
PIPE
left->
{
cmd -> "grep"
args ->
"l"
}
right->
{
redirect-> 2
file-> file
AST->
{
cmd -> "grep"
args ->
"m"
}
}
}
}
어떤 부분이 문제 인가요?
parse_line()
에서의 문제점은 없으므로 Close 합니다!
위의 경우와 같을때 지금의 로직으로는 cat file이 동작하지 않음(bash에서는 동작) -> 따라서 control_operator을 pipe보다 상위의 개념으로 파싱 필요