I am working on an program related to shell commands.
I want to make that, when the user enter an command, this not show any output.
I have tried adding > /dev/null
to the command, this works well for commands like
$ echo "some text" | sudo tee some.txt > /dev/zero
$ cat some.txt
some text
But if the user enter a command with append (>>), the new line is not added as expected
$ echo "appending another line" >> some.txt > /dev/zero
$ cat some.txt
some text
I understood that the commands were executed from left to right, something escapes me