minishell$ chmod 000 a
minishell$ cat a | echo hi
hi
cat: a: Permission denied
minishell$ hi > a | echo hi
minishell: unable to open file for writing: a
minishell$
1st case, we still echo hi but in 2nd case we don't, which is a bit inconsistent.
Bash and zsh echo hi in both cases.
This is trivial though, maybe no need to fix, just so we know.
minishell$ chmod 000 a
minishell$ cat a | echo hi
hi
cat: a: Permission denied
minishell$ hi > a | echo hi
minishell: unable to open file for writing: a
minishell$
1st case, we still echo hi but in 2nd case we don't, which is a bit inconsistent.
Bash and zsh echo hi in both cases.
This is trivial though, maybe no need to fix, just so we know.