I have a text file as below:
[Global]
$DBConnection_prd_load=GETDB
$$SURVEY_TYPE=ALL
$$VENDOR_SURVEY_ID=5
[email protected]
$$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..?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…