tech123786
Technical User
Hello,
I have a text file with database instance names, each in a line.(Ex: dbinst1
dbinst2
dbinst3)
I need to run some commands on each of these instances after the database startup. I have a separate database startup script. so I just need to add some stuff to the startup script.Here is what I was thinking about.
#!/bin/ksh
#(DB startup commands will come here)
FILE="/usr/local/instfile"
exec 4<$FILE
while read each_line <&4
do
#I will run some commands on that perticular instance.
done
exec 4<&-
Is this right way to read and apply the commands?
Thanks
I have a text file with database instance names, each in a line.(Ex: dbinst1
dbinst2
dbinst3)
I need to run some commands on each of these instances after the database startup. I have a separate database startup script. so I just need to add some stuff to the startup script.Here is what I was thinking about.
#!/bin/ksh
#(DB startup commands will come here)
FILE="/usr/local/instfile"
exec 4<$FILE
while read each_line <&4
do
#I will run some commands on that perticular instance.
done
exec 4<&-
Is this right way to read and apply the commands?
Thanks