change file contents using script

Hi,

Requirement:-

Need to change pfile,so while executing script,it has to go to pfile location(ORACLE_HOME/dbs) and open init<SID>.ora file and change value db_name=<>.
If db_name=abcd,script will change the db_name=1234 likr that..

Please help to code this

for f in $ORACLE_HOME/dbs/*.ora
do
 sed -i 's/dbname=abcd/dbname=1234/g' $f
done