Medio ambiente y sistema

Medio ambiente y sistema

Todo lo que intento hacer es obtener la variable VOL de /sound.cfg, dependiendo del número DEV.

cat /sound.cfg
VOL1=20%

El script de inicio de Systemd incluye:

[Service]
Environment="DEV=1"
EnvironmentFile=/sound.cfg
ExecStartPre=-/bin/bash -c "VOL=VOL${DEV} /bin/echo /usr/bin/amixer -c chan.${DEV} sset Mic ${!VOL} dev $DEV"

Desafortunadamente, el eco me lo muestra /usr/bin/amixer -c chan.1 sset Mic dev 1, sin necesidad VOL1. Systemd no admite matrices, lo que sería muy útil.

información relacionada