Hi,
I am using the following command to create a log file.
echo "`date` Starting the workflow" >> MYLOG_`date '+%d%m%Y'`.log
My application (Informatica) takes the above command and issues the following to the UNIX server.
sh -c "echo "`date` Starting the workflow" >> MYLOG_`date '+%d%m%Y'`.log"
But the problem is, sometimes The above command fails on UNIX server Since i used double Quotes in echo command.
Then if i remove double Quotes from echo command then Informatica issues the following command and it executes fine.
sh -c "echo `date` Starting the workflow >> MYLOG_`date '+%d%m%Y'`.log"
Can somebody tell me what is the coding standard when using UNIX commands with sh -c ?
What exactly sh -c means ?
I searched online but not able to find sufficient information.
Thanks in advance