Files
yatm/scripts/readinfo
2023-10-03 16:12:44 +08:00

8 lines
176 B
Bash
Executable File

#!/usr/bin/env bash
set -ex;
mt -f ${DEVICE} load
BARCODE=`./yatm-lto-info -f ${DEVICE} | grep 'Barcode' | awk '{print $3}'`
echo "{\"barcode\": \"$BARCODE\"}" > $OUT
sleep 3