#!/bin/sh # OKI 320 ML tests # this test is to generate (crap) random 8 pin mode patterns #PRNG function rand { echo "obase=8;`expr $RANDOM % 256`" | bc } function randpat { n=1 while [ $n -le 256 ]; do RND=`rand` echo -ne '\'$RND n=$((n+1)) done } PATTERN=`randpat` # noise # PATTERN2=`head /dev/urandom -c 1024` echo -e '^[@^[5^[9^[*1\4'$PATTERN'^[@' | lp -o raw