#!/bin/sh # this script echoes some useful outputs so we can see what parallel # and srun are doing sleepsecs=$[ ( $RANDOM % 10 ) + 10 ]s # $1 is arg1:{1} from parallel. # $PARALLEL_SEQ is a special variable from parallel. It is the actual sequence # number of the job regardless of the arguments given # We print the sleep time, hostname, and date for more info echo task $1 seq:$PARALLEL_SEQ sleep:$sleepsecs host:$(hostname) date:$(date) # sleep a random amount of time sleep $sleepsecs