From 347c2a1edf3c41eb18a546cad5ee999e5dec91f2 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 22 Feb 2023 20:40:14 -1000 Subject: [PATCH] Bug 33050: More args for misc/cronjobs/runreport.pl Add to script misc/cronjobs/runreport.pl args for CSV : * separator character * quote character See perl doc https://metacpan.org/pod/Text::CSV#new Test plan : Play with each arg and compare results of runreport.pl --- misc/cronjobs/runreport.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl index 8b3c12b3b0..80f24b23c2 100755 --- a/misc/cronjobs/runreport.pl +++ b/misc/cronjobs/runreport.pl @@ -63,6 +63,8 @@ runreport.pl [ -h | -m ] [ -v ] reportID [ reportID ... ] --subject=s subject for the e-mail --param=s parameters for the report --store-results store the result of the report + --separator separator character for CSV + --quote quote character in CSV --csv-header add column names as first line of csv output @@ -129,6 +131,15 @@ Store the result of the report into the saved_reports DB table. To access the results, go on Reports > Guided reports > Saved report. +=item B<--separator> + +Separator character for CSV, by default comma. + +=item B<--quote> + +Quote char in CSV, by default double quote. +Empty string is allowed. + =back =head1 DESCRIPTION @@ -205,6 +216,8 @@ GetOptions( 'password:s' => \$password, 'method:s' => \$method, 'store-results' => \$store_results, + 'separator=s' => \$separator, + 'quote=s' => \$quote, 'csv-header' => \$csv_header, ) or pod2usage(2); -- 2.39.0