NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Script to easily manipulate audio volume in NetBSD.



On Wed, 25 Mar 2026 23:55:55 -0600
"DTB" <trinity@tebibyte.media> wrote:

> ```sh
> case "$1" in
> up)   mixerctl -w "$MIXER_VARIABLE+=$INCREMENT" ;;
> down) mixerctl -w "$MIXER_VARIABLE-=$INCREMENT" ;;
> #etc
> *)    usage; exit 64 ;; # sysexits(3) EX_USAGE if i recall
> esac
> ```
> 
> This would also cover the case of $# -lt 1, though you might still
> find something like `test -n "$2" && usage && exit 64` necessary.
> 

I hadn't thought of that. It makes much more sense! Thank you very
much, DTB.

Best regards,
Isac


Home | Main Index | Thread Index | Old Index