shell script for crossvalidation