Hi All,
Following is my issue.
$MAIL_DOC = test.txt
test.txt contains the following text .
This process was executed in the %INSTANCE% instance on %RUNDATE%.
I am trying to execute the following script
var=`echo $ORACLE_SID | tr [a-z] [A-Z]`
NOW=$(date +"%D")
sed -e "s/\%INSTANCE\%/$var/g;s/\%RUNDATE\%/$NOW/g" $MAIL_DOC
I am trying to display the current date in mm/dd/yy format.
Thats where the issue is .
If I try to display in mm-dd-yy format using date '+%m-%d-%Y' I do not have any issues.
But if I try to display in mm/dd/yy format using date +"%D" , I get sed command garbled.
Will sed command and date +"%D" format don't work ?
Please help.
Thanks
Megha.