#$ -t 1-1000 # ...tell SGE that this is an array job, with "tasks" numbered from 1 # to 10000... ./myprog < data.$SGE_TASK_ID > results.$SGE_TASK_ID