#!/bin/bash STORAGE_DIR="$HOME/.local/share/sevenkeys/testimages/" mkdir -p "$STORAGE_DIR" echo "test_card_scanner_count: Beginning test" while true; do rng="$(cat /dev/random | tr -cd 'a-f0-9' | head -c 32)" filename="$STORAGE_DIR/$rng.png" scanimage --output-file="$filename" --source "ADF Front" --mode Color --page-width 63mm --page-height 88mm 2>/dev/null done