Hi
sed -f /opt/DBACheck.sql.sed /opt/DBACheck.sql > /opt/DBACheck.sql.tmp
mv -f $DBACheck.sql.tmp $DBACheck.sql
where the contents of DBACheck.sql.sed is
{
s%${DBMS_USER}%SYSTEM%g
}
DBACheck.sql is a one line file , that contains line with string DBMS_USER which i want to replace it with SYSTEM.
But on executing i get DBACheck.sql to be an empty file with all its contents erased .
DBACheck.sql -
select granted_role from sys.dba_role_privs where grantee='${DBMS_USER}';
Thanks
Shyamala