What I want is a volume indicator to be displayed every time I change the sound volume. Currently I use this command to change the sound volume: amixer -D pulse -q sset Master 10%+ unmute
and every time I do it a sound is played: play -t mp3 /home/pemartins/Arquivos/click.mp3
and I want to add another line to show the volume level on the screen for a second or so but I have no idea how to do it.
I think I did, I copied the code into a mew file, called that file "testa", made it executable, opened a terminal window on its folder, typed "./testa" and all I got was this:
$ ./testa
Argument number incorrect, only one parameter is needed
./testa: line 73: return: can only `return' from a function or sourced script
Wrong parameter value !
Possible values are: up, down, mute
./testa: line 97: return: can only `return' from a function or sourced script
./testa: line 101: return: can only `return' from a function or sourced script
Maybe it didn't use properly but I don't know another possible way to use it.
Also tried the first script in the first link and only got this:
$ ./testa
Specify a scontrol identifier: 'name',index
./testa: line 6: [: ==: unary operator expected
Specify a scontrol identifier: 'name',index
./testa: line 15: let: volcounter=volset/: syntax error: operand expected (error token is "/")