#! /bin/sh BATOCERA_UUID=$(lsblk --fs --noheadings --pairs -o TYPE,LABEL,UUID | grep -E '^TYPE="part" LABEL="BATOCERA" UUID="[^"]*"$' | sed -e s+'^TYPE="part" LABEL="BATOCERA" UUID="\([^"]*\)"$'+'\1'+ | head -1) if test -n "${BATOCERA_UUID}" then echo "Image batocera found on ${BATOCERA_UUID}" >&2 cat <