Hide aplay shell output

Is there a way to hide the output of the aplay command when playing a sound?

I tried this without success

$ aplay ~/.zsh/sounds/done.wav >> /dev/null

Playing WAVE '/home/oscar/.zsh/sounds/done.wav' : Unsigned 8 bit, Rate 11025 Hz, Mono

I would be grateful for your help.

+4
source share
1 answer

Just add an option -q:

aplay -q ~/.zsh/sounds/done.wav

There is no need to redirect stdout to / dev / null.

Another note: aplayactall sends messages to / dev / stderr (fd 2). You can also invalidate the output by sending it to / dev / null:

aplay ~/.zsh/sounds/done.wav 2>/dev/null

You can see more options with aplay --help. This line is about -q:

-q, --quiet             quiet mode
+6
source

Source: https://habr.com/ru/post/1543899/


All Articles