Files
yatm/scripts/readinfo
2023-09-26 16:53:05 +08:00

8 lines
212 B
Bash
Executable File

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