On 11/29/2010 05:13 PM, Steven Timm wrote:
yes, setYes, I know about $(cluster). The problem is that I want to know the cluster number generated by a condor_submit command called in a shell script like this: #!/bin/sh -f job=$0.$$.submit LOGDIR=$0.$$ mkdir $LOGDIR arg="-v" echo "Universe=vanilla" >> ${job} echo "Executable=/bin/exe" >> ${job} echo "Input=/dev/null" >> ${job} echo "Output=${LOGDIR}/out.\$(Process) " >> ${job} echo "Error=${LOGDIR}/err.\$(Process) " >> ${job} echo "log=${LOGDIR}/log " >> ${job} echo "transfer_executable=yes" >> ${job} echo "when_to_transfer_output = ON_EXIT" >> ${job} nn=0 for ((j=1;j<1000;j++)) ; do echo "Arguments=${arg} $j" >> ${job} echo "Queue" >> ${job} echo "" >> ${job} nn=`expr $nn + 1` done condor_submit ${job} condor_wait ${LOGDIR}/log Here I want to know the cluster number in order to regroup all the Output and Error files in one file named $(cluster).log For the moment the only ideea I have is to parse the output of condor_submit like this: c_submit=`condor_submit ${submit}` exit_status=$? if [ ${exit_status} != 0 ]; then exit ${exit_status} fi cluster=`echo ${c_submit} | grep "submitted to cluster" | awk '{print $NF}' ` but this is dependent on the output of the condor_submit command which could change in other version of Condor. I want to use the cluster number because it is unique (unlike $$ which is the PID of the shell and for sure will be reused by the system). Best regards, Alexandru
|