1

I have problem with play command and its huge output. I wanted to disable output from this command by added >/dev/null but it still produces the same huge output. What can I do to fix it? Full command is for example play whatever.mp3 >/dev/null.

3

That's presumably because the outputs you are still getting are being sent on the STDERR (file descriptor 2) stream, not on the STDOUT (file descriptor 1) stream.

Normally, warning and error messages are sent on the STDERR, and regular output on STDOUT stream.

If you want to disable outputting on STDERR too, send the file descriptor 2 to /dev/null too:

play >/dev/null 2>&1

Or in bash (or zsh, ksh):

play &>/dev/null
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.