File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/nectarchain/user_scripts/jlenain/dqm_job_submitter Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,19 +16,19 @@ localParentDir="/data/nvme/ZFITS"
1616remoteParentDir=" /vo.cta.in2p3.fr/nectarcam"
1717nectarchainScriptDir=" $HOME /local/src/python/cta-observatory/nectarchain/src/nectarchain/user_scripts/jlenain/dqm_job_submitter"
1818
19- cd $nectarchainScriptDir
19+ cd $nectarchainScriptDir || (echo " Failed to cd into ${nectarchainScriptDir} , exiting... " ; exit 1)
2020
2121for run in $( find ${localParentDir} -type f -name " NectarCAM*.fits.fz" | awk -F. ' {print $2}' | awk -Fn ' {print $2}' | sort | uniq) ; do
2222 echo " Probing files for run ${run} "
2323 nbLocalFiles=$( find ${localParentDir} -type f -name " NectarCAM.Run${run} .????.fits.fz" | wc -l)
2424 echo " Found $nbLocalFiles local files for run $run "
25- nbRemoteFiles=$( dfind $remoteParentDir | grep -e " NectarCAM.Run${run} " | grep -e " fits.fz" | wc -l )
25+ nbRemoteFiles=$( dfind ${ remoteParentDir} | grep -e " NectarCAM.Run${run} " | grep --count - e " fits.fz" )
2626 echo " Found $nbRemoteFiles remote files on DIRAC for run $run "
2727 # If number of local and remote files matching, will attempt to launch a DQM run
28- if [ $nbLocalFiles -eq $nbRemoteFiles ]; then
28+ if [ ${ nbLocalFiles} -eq ${ nbRemoteFiles} ]; then
2929 echo " Run $run : number of local and remote files matching, will attempt to submit a DQM job"
3030 # Has this DQM run already been submitted ?
31- if [ $( dstat | grep -e " NectarCAM DQM run ${run} " | wc -l ) -eq 0 ]; then
31+ if [ $( dstat | grep --count - e " NectarCAM DQM run ${run} " ) -eq 0 ]; then
3232 yyyymmdd=$( find ${localParentDir} -type f -name " NectarCAM.Run${run} .????.fits.fz" | head -n 1 | awk -F/ ' {print $6}' )
3333 yyyy=${yyyymmdd: 0: 4}
3434 mm=${yyyymmdd: 4: 2}
You can’t perform that action at this time.
0 commit comments