merge-hadd.sh 405 B

123456789101112131415161718
  1. #!/bin/sh
  2. INDIR=$1
  3. NFILES=$2
  4. cd ${INDIR}/MERGE/
  5. FILE_LIST=${INDIR}/MERGE/file_list
  6. find ${INDIR}/ -iname "*.root" > ${FILE_LIST}
  7. split -l ${NFILES} -d ${FILE_LIST} hadd_files_
  8. find $PWD -name "hadd_files_*" > ALLHADD
  9. while read FILENAME; do
  10. TASKNAME=${FILENAME}.sh
  11. cp /lustre/nyx/hades/user/svintsov/mpdroot_batch/real-flow/hadd-example.sh ${TASKNAME}
  12. sbatch ${TASKNAME} ${FILENAME}
  13. done <ALLHADD