change bash script for executing different num of threads