SOURCE $HOME/.bash_profile
Pre_date= ' DATE + '%y-%m-%d "-D" -1days "'
If [$#-ne 0];then
pre_date=$1;
Fi
Python test5.py $PRE _date
echo "Delete from Lsb_cbh_test;" > Test1.sql
Psql "host=10.100.0.254 hostaddr=10.100.0.254 port=5433 user=sys_report password=report2hhl Dbname=sysreport"-F Test1.sql
#echo "\copy lsb_cbh_test from ' test_1.csv ' delimiter as ', ' null as ' null ';" >test.sql
echo "\copy lsb_cbh_test (type_id,cuid) from ' test11_new.txt ' delimiter as ', '; ' >test.sql
Psql "host=10.100.0.254 hostaddr=10.100.0.254 port=5433 user=sys_report password=report2hhl Dbname=sysreport"-F Test.sql
V_date= ' echo $PRE _date|sed ' s/-//g '
echo "Select Sp_stat_client_visit (' $v _date ');" >test2.sql
Psql "host=10.100.0.254 hostaddr=10.100.0.254 port=5433 user=sys_report password=report2hhl Dbname=sysreport"-F Test2.sql
Shell Access Postgresql,copy Inbound, call function