#!/bin/bash [ "$1" -ge 0 ] [ "$1" -le 255 ] [ "$2" -ge 1 ] [ "$2" -le 31 ] mkdir -p exp$2 ./cacount_$2 $1 cycle | pbzip2 -c >exp$2/$1.cycles.bz2~ mv exp$2/$1.cycles.bz2~ exp$2/$1.cycles.bz2