Skip to content

Commit

Permalink
fix barcode extraction (#190)
Browse files Browse the repository at this point in the history
* fix barcode extraction
  • Loading branch information
retokromer authored and dericed committed Jan 22, 2019
1 parent 6b88fe3 commit 103a601
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mountlto
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ for i in $(seq 1 "${LTO_COUNT}") ; do
let COUNTER=COUNTER+1
ltfs -f -o devname="${DECK}" 2> "${LOADTMP}"
# find barcode by either "Volser(Barcode)" (Quantum style) or "Tape attribute: Barcode" (IBM style)
TAPE_SERIAL=$(cat "${LOADTMP}" | grep -a "Volser(Barcode)\|Tape attribute: Barcode" | awk 'NF>1{print $NF}')
TAPE_SERIAL=$(cat "${LOADTMP}" | grep -o "Volser(Barcode).*\|Tape attribute: Barcode.*" | grep -Eo "\b[A-Z0-9]{6}\b|\b[A-Z0-9]{8}\b")
echo -n "."
done
echo
Expand Down

0 comments on commit 103a601

Please sign in to comment.