2 # Script to find, delete and retire duplicate files
4 #$1 The common part of the definition name up to the stage
7 #stages=( gen g4 detsim reco1 reco2 caf ) # TODO: make this a parameter to be passed, with these as the defaults
8 stages=( gen_g4_detsim_reco1 reco2_caf ) # TODO: make
this a parameter to be passed, with these as
the defaults
12 defname=
"${defbasename}_${stage}_sbnd"
13 echo
"On stage: $stage with defname: $defname"
15 # Check the dataset exists
18 echo
"Definition not found by SAM"
24 fifeutils_run_duplicate_finder_descendants.sh $defname | tee
"${defname}_dupes.txt"
26 echo
"Found $(grep $stage ${defname}_dupes.txt | wc -l) $stage duplicate files with $(wc -l ${defname}_dupes.txt) files including ancestors"
28 convert_filename_to_ifdh_path.sh
"${defname}_dupes.txt" | tee
"${defname}_ifdh.txt"
32 # TODO:
get y/
n confirmation to
delete the files
33 # This will ensure that we
do not
delete the whole dataset by accident
35 # ifdh_delete_files.sh
"${defname}_ifdh.txt"
36 # sam_retire_files.sh
"${defname}_dupes.txt"
process_name opflash particleana ie ie y
return match has_match and(match.match_pdg==11 or match.match_pdg==-11)
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
stream1 can override from command line with o or output services user sbnd