hi
i have a bash script that runs a report from db. then mails it to me. my question is the dates in the script must change every month. how can i add a variable to this?
it runs fine when i run it manual, even mmails the report to me.
how to i set a variable to cahnge 2015-09--1 and 2015-09-31. wanto set up a cron job to do this monthly.
thanks jacques
i have a bash script that runs a report from db. then mails it to me. my question is the dates in the script must change every month. how can i add a variable to this?
Code:
#!/bin/ksh db2 connect to ***** user ***** using **** db2 "SELECT ESB_DATE_PRCSD, UNIQ_INSTC_ID, ACC_N, REF_N, TRANS_CODE, DR_CR_I, TRANS_AMT, TRANS_DATE, TRANS_TIME, EFCTV_DATE, BANK_NAME, BRCH_CODE, CHEQ_N FROM PAYMTNTFTN_AUDIT_LOG where ACC_N IN ('******') and ESB_DATE_PRCSD >= '2015-09-01' and ESB_DATE_PRCSD <= '2015-09-30' and HTTP_STTS = 'REQUEST'" > filename_$date
how to i set a variable to cahnge 2015-09--1 and 2015-09-31. wanto set up a cron job to do this monthly.
thanks jacques