script to sample results directories