From 93bf44c912bc3289b7bfe25a0307446d5445dd60 Mon Sep 17 00:00:00 2001 From: "Pierre Gueth (kingkong)" Date: Wed, 28 Mar 2012 13:39:44 +0200 Subject: [PATCH] new power merge with unkown txt output support --- cluster_tools/gate_power_merge.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cluster_tools/gate_power_merge.sh b/cluster_tools/gate_power_merge.sh index deca56f..590fcd6 100755 --- a/cluster_tools/gate_power_merge.sh +++ b/cluster_tools/gate_power_merge.sh @@ -226,10 +226,19 @@ function merge_dispatcher { fi fi + if test "${firstpartialoutputextension}" == "txt" + then + echo "${indent}this is a non specific txt output" + local mergedfile="${outputdir}/$(basename "${firstpartialoutputfile}")" + echo " ${indent}catting ${mergedfile}" + cat ${partialoutputfiles} > "${mergedfile}" || error "error while merging" + return + fi + warning "unknown file type" } -echo "!!!! this is $0 v0.3f !!!!" +echo "!!!! this is $0 v0.3g !!!!" rundir="${1?"provide run dir"}" nboutputdirs="$(find "${rundir}" -mindepth 1 -type d -name 'output*' | wc -l)" @@ -247,7 +256,7 @@ echo "output dir is ${outputdir}" test -d "${outputdir}" && rm -r "${outputdir}" mkdir "${outputdir}" -for outputfile in $(find "${rundir}" -regextype 'posix-extended' -type f -regex '.*\.(hdr|root|txt)' | awk -F '/' '{ print $NF }' | sort | uniq) +for outputfile in $(find "${rundir}" -regextype 'posix-extended' -type f -regex "${rundir}/output.*\.(hdr|root|txt)" | awk -F '/' '{ print $NF; }' | sort | uniq) do merge_dispatcher "${outputfile}" done -- 2.47.1