Skip to content

Instantly share code, notes, and snippets.

@gdhaworth
Last active August 29, 2015 14:15
Show Gist options
  • Save gdhaworth/4e7969ffe26726e552af to your computer and use it in GitHub Desktop.
Save gdhaworth/4e7969ffe26726e552af to your computer and use it in GitHub Desktop.
A ridiculous way to get an average hashrate straight from the output of ccminer.
function hashrate() { echo $(($(fgrep 'Total: ' ${1}.out | egrep -o '[0-9]+ khash/s' | awk '{ print $1 }' | tail -n +2 | paste -sd+ | bc) / $(fgrep 'Total: ' ${1}.out | egrep '[0-9]+ khash/s' | tail -n +2 | wc -l))); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment