#!/bin/bash if ! test -f result.txt then echo 'result.txt not found' fi echo "Pendrive test 'usbtest': writing and reading with dd," echo "write-small-files from tarball with operating system (OBI-text)" /bin/echo -e '"Pendrive specification"\t"write-dd"\t"read-dd"\t"write-small-files"' /bin/echo -e -n '""\t"MB/s"\t"MB/s"\t"kB/s"' retcod=0 while [ "$retcod" == 0 ] do read line retcod=$? if [ "${line:0:5}" == "Model" ] then echo "" /bin/echo -e -n "\"$line\"\t" fi if [ "$line" == "write random data via dd (2GB)" ] then read line read line read line wdd=$(echo "$line" |cut -d ' ' -f 8) /bin/echo -e -n "wdd=$wdd\t" fi if [ "$line" == "read the same data via dd (2GB)" ] then for (( i=1; i<=3 ; i++ )) ; do read line;done rdd=$(echo "$line" |cut -d ' ' -f 8) /bin/echo -e -n "rdd=$rdd\t" fi if [ "$line" == "write small files from 'ball.tar.xz'" ] then for (( i=1; i<=5 ; i++ )) ; do read line;done wsf=$(echo "$line" |cut -d ' ' -f 8) /bin/echo -e -n "wsf=$wsf\t" fi done < result.txt echo ""