I have a text file as below:
[Global]
$DBConnection_prd_load=GETDB
$$SURVEY_TYPE=ALL
$$VENDOR_SURVEY_ID=5
$$PROD_EMAIL=users@tnnnet.com
$$LASTRUNDATE=10/24/2013
I want to pass above file $$LASTRUNDATE
value to below script. Pl help. And also replace /
with _
.
#! /bin/ksh
export SRCDIR=/informat/PowerCenter/9.1.0/server
export TGTDIR=/informat/PowerCenter/9.1.0/server/infa
export FILEDT=**$$LASTRUNDATE**
cd ${SRCDIR}
export GET_FNAME=AllResponses_${FILE_NUM}_${FILEDT}*.txt
if [ -f ${GET_FNAME} ]; then
cp ${SRCDIR}/${GET_FNAME} ${TGTDIR}
Can you pl also let me know how to replace '\' with '_' ?
Friend..one more small favour..is it possible to add 1 day to date that we get in the above variable..?