The following commands I give after logging in as root

su -c user1
lsnrctl
start listener1
exit
svrmgrl
connect internal
startup
exit
lsnrctl
start listener2
exit
cd /home/app/oracle/admin/xxx/scripts
./ap.sh start all
exit
su -c user2
cd /home/app/oracle/1103/admin/xxx/scripts
./apcm.sh start
./apfrm.sh start

Now the question is whether I can automate this? The OS is Sun Sparc Solaris 2.6, Oracle 8.0.5 and Oracle Applications 11.0.3.

I tried but failed. Can u help please?

Thanks.

With regards.