Script abc.ksh should replace value of file xyz.sql as below
Search for string "%s_sitename as of date "+%Y-%b-%e"" where date changed with sysdate everytime we execute abc.ksh
s1='%s_sitename%[a-z][0-9]/-'
s2='%s_sitename%'"$(date "+%Y-%b-%e")"
sed -i 's/'"$s1"'/'"$s2"'/g' xyz.sql
abc.sql file should be updated every time with sysdate as below
"%s_sitename% as of 2016-Jun-22"
With current come I am getting wired output as below