I'd like to evaluate the variable called arduino outside the for loop, but it always gives me 0.arduino=0for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do    (        syspath=${sysdevpath%/dev}        devname=$(udevadm info -q name -p $syspath)        [[ $devname == bus/* ]] && continue        eval $(udevadm info -q property --export -p $syspath)        [[ -z $ID_SERIAL ]] && continue        dispositivo=/dev/$devname - $ID_SERIAL        if [[ $dispositivo == *Arduino* ]]; then            arduino=1            echo 'CONNECTED DEVICE'        fi    )doneif [ $arduino -eq 1 ]; then    echo 'CONNECTED DEVICE'else    echo 'DISCONNECTED DEVICE'fi
How assign a value to a variable inside a for loop in bash?
linux;bash;shell script;shell;for