The su command changes user credentials to those of the root user or
to the user specified by the Name parameter, and then initiates a new
session.
su - oratest -c "command text"
is it possible for the "command text" to be an inline function instead
of a command or script? Here is my code. The error I get is "ksh:
file_remove: not found."
#!/bin/ksh
##sample code
function file_remove
{
cd $1
find . -name \*.trc -mtime +$2 -exec rm {} \;
}
su - oratest "-c file_remove $ORACLE_HOME/admin/bdump 60"