stress_test_common 303 B

12345678910111213141516
  1. #!/bin/bash
  2. # Emit an error message
  3. error() {
  4. echo "error: ${@}" >&2
  5. }
  6. # Given a token, search for and count the instances of lines from the
  7. # logfile that start with the token.
  8. count_result() {
  9. if [ ! -z "${1}" ]; then
  10. echo $(cat "${log}" | grep "^${1} " | wc -l)
  11. else
  12. echo 0
  13. fi
  14. }