#!/bin/bash # ## WK HW diagnostics - Prime95 # Find executable MPRIME="/usr/bin/mprime$(getconf LONG_BIT)" function usage { echo "Usage: $0 log-dir" echo " e.g. $0 /tmp/tmp.7Mh5f1RhSL9001" } # Bail early if [ ! -d "$1" ]; then usage exit 1 fi # Run Prime95 $MPRIME -t | grep -iv --line-buffered 'stress.txt' | tee -a "$1/prime.log"