Skip to content

Instantly share code, notes, and snippets.

@steinnes
Created June 20, 2014 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steinnes/eec1bb6cc6eaf054bdee to your computer and use it in GitHub Desktop.
Save steinnes/eec1bb6cc6eaf054bdee to your computer and use it in GitHub Desktop.
rateof.sh
#!/bin/bash
CMD=$1
cmds=`bash -c "$CMD"`
while [ 0 ]; do
new_cmds=`bash -c "$CMD"`;
let cmds_per_sec="$new_cmds - $cmds";
echo $cmds_per_sec;
cmds=$new_cmds;
sleep 1;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment