File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
doc/sphinx-guides/source/_static/util Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2+ # counter_daily.sh
23
34COUNTER_PROCESSOR_DIRECTORY=" /usr/local/counter-processor-1.06"
45MDC_LOG_DIRECTORY=" /usr/local/payara6/glassfish/domains/domain1/logs/mdc"
56COUNTER_PROCESSOR_TMP_DIRECTORY=" /tmp"
67# If you wish to keep the logs, use a directory that is not periodically cleaned, e.g.
78# COUNTER_PROCESSOR_TMP_DIRECTORY="/usr/local/counter-processor-1.06/tmp"
89
9- # counter_daily.sh
10-
1110cd $COUNTER_PROCESSOR_DIRECTORY
1211
1312echo >> $COUNTER_PROCESSOR_TMP_DIRECTORY /counter_daily.log
@@ -44,13 +43,14 @@ for report_file in $COUNTER_PROCESSOR_TMP_DIRECTORY/make-data-count-report.json.
4443 echo " Finished processing $report_file " >> $COUNTER_PROCESSOR_TMP_DIRECTORY /counter_daily.log
4544
4645 # Extract the base filename and the extension
47- file_base=$( basename " $report_file " .json. * )
46+ file_base=$( basename " $report_file " | sed ' s/\ .json\..*// ' )
4847 file_ext=$( echo " $report_file " | sed -n ' s/.*\.json\.\(.*\)/\1/p' )
49-
48+ echo $file_base
49+ echo $file_ext
5050 # Remove the old file if it exists
51- rm -f $COUNTER_PROCESSOR_TMP_DIRECTORY /${file_base} .json.${YEAR_MONTH }
52-
51+ rm -f $COUNTER_PROCESSOR_TMP_DIRECTORY /${file_base} .${YEAR_MONTH} . json.${file_ext }
52+
5353 # Move the processed file
54- mv $report_file $COUNTER_PROCESSOR_TMP_DIRECTORY /${file_base} .json.${YEAR_MONTH }
54+ mv $report_file $COUNTER_PROCESSOR_TMP_DIRECTORY /${file_base} .${YEAR_MONTH} . json.${file_ext }
5555 fi
56- done
56+ done
Original file line number Diff line number Diff line change 4545
4646}
4747
48- # Call the function on the root dataverse to start processing
48+ # Call the function on the root dataverse to start processing
4949processDV 1
You can’t perform that action at this time.
0 commit comments