blob: ce4a43d5f4ed54a4a87fef693d77af6767d66260 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 AGENTNUM in $AGENTNUMS; do
for a in header detail; do
mv agentnum$AGENTNUM-$a.csv agentnum$AGENTNUM-$date-$a.csv
done
zip agentnum$AGENTNUM-$date.zip agentnum$AGENTNUM-$date-header.csv agentnum$AGENTNUM-$date-detail.csv
echo $dir/agentnum$AGENTNUM-$date.zip
done
|