From 0da0726449c32868963ddace7630892c37cdeb6f Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 28 Oct 2005 17:10:45 +0000 Subject: beginning of quick billco zip & upload tool --- bin/billco-upload | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 bin/billco-upload (limited to 'bin/billco-upload') diff --git a/bin/billco-upload b/bin/billco-upload new file mode 100644 index 000000000..b224605bf --- /dev/null +++ b/bin/billco-upload @@ -0,0 +1,14 @@ +#!/bin/sh + +date = `date` +dir = /usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/cust_bill +cd $dir + +for a in header detail; do + mv spool-$a.csv $date-$a.csv +done + +zip $date.zip $date-header.csv $date-detail.csv + +echo $dir/$date.zip + -- cgit v1.2.1 From 82a758a8e4aa37e1e312969b2b23b611205be9ec Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 1 Nov 2005 03:16:33 +0000 Subject: good nuff for 11/1 --- bin/billco-upload | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin/billco-upload') diff --git a/bin/billco-upload b/bin/billco-upload index b224605bf..165eafadf 100644 --- a/bin/billco-upload +++ b/bin/billco-upload @@ -1,14 +1,14 @@ #!/bin/sh -date = `date` -dir = /usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/cust_bill -cd $dir +date=`date +"%Y%m%d"` +dir="/usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/cust_bill" +cd "$dir" for a in header detail; do mv spool-$a.csv $date-$a.csv done -zip $date.zip $date-header.csv $date-detail.csv +echo zip $date.zip $date-header.csv $date-detail.csv echo $dir/$date.zip -- cgit v1.2.1 From 2fa0c10b17335cf02aaa1b65781b09db8f0f3301 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 1 Nov 2005 05:21:29 +0000 Subject: do the zip --- bin/billco-upload | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/billco-upload') diff --git a/bin/billco-upload b/bin/billco-upload index 165eafadf..f0adbd88b 100644 --- a/bin/billco-upload +++ b/bin/billco-upload @@ -8,7 +8,7 @@ for a in header detail; do mv spool-$a.csv $date-$a.csv done -echo zip $date.zip $date-header.csv $date-detail.csv +zip $date.zip $date-header.csv $date-detail.csv echo $dir/$date.zip -- cgit v1.2.1 From ff0c9737888772449b0b28b13657c0dc43fc0ae4 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 3 Jan 2006 08:45:27 +0000 Subject: agentnums 1-3 --- bin/billco-upload | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'bin/billco-upload') diff --git a/bin/billco-upload b/bin/billco-upload index f0adbd88b..ce4a43d5f 100644 --- a/bin/billco-upload +++ b/bin/billco-upload @@ -1,14 +1,20 @@ #!/bin/sh +AGENTNUMS="1 2 3" + date=`date +"%Y%m%d"` dir="/usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/cust_bill" cd "$dir" -for a in header detail; do - mv spool-$a.csv $date-$a.csv -done +for AGENTNUM in $AGENTNUMS; do + + for a in header detail; do + mv agentnum$AGENTNUM-$a.csv agentnum$AGENTNUM-$date-$a.csv + done -zip $date.zip $date-header.csv $date-detail.csv + zip agentnum$AGENTNUM-$date.zip agentnum$AGENTNUM-$date-header.csv agentnum$AGENTNUM-$date-detail.csv -echo $dir/$date.zip + echo $dir/agentnum$AGENTNUM-$date.zip + +done -- cgit v1.2.1