#!/usr/bin/env bash docker_command="docker run -m=4m -v `pwd`:`pwd` -w `pwd` hyper_iterator ruby ./benchmark/memory_bm" if [ "$1" = "each" ] || [ "$1" = 1 ]; then eval "$docker_command/each.rb" eval "$docker_command/each_bang.rb" elif [ "$1" = "each" ] || [ "$1" = 2 ]; then eval "$docker_command/each_slice.rb" eval "$docker_command/each_slice_bang.rb" else echo 'Please specify method for benchmarking. You can choose anyone from below:' echo '1. each!' echo '2. each_slice!' fi