Does anyone have an example of how to correctly use this instruction? I can write my changes to a file, put I've been unsuccessful in attempting to use this instruction.
Here is what I'd like to do. Through a KSH shell app, I need to substitute user names and directory locations in an Oracle init.ora file. I've got a canned init.ora file and I thought I could use the SED utility to modifiy this file. I thought if I could list the variables in a file, get SED to read the file, it could substitute the values in the init.ora file.
Something like '1,$ s/NEWSCHEMA/<name of new schema>/w init.ora'. Obviously '<name of new schema>' is the variable I'd like to change.
Can I read this value from a file and use SED to change the file?
I cannot get the syntax down for the read instruction:
1,$ r infile s/NEWSCHEMA/<name of new schema>/
Here is what I'd like to do. Through a KSH shell app, I need to substitute user names and directory locations in an Oracle init.ora file. I've got a canned init.ora file and I thought I could use the SED utility to modifiy this file. I thought if I could list the variables in a file, get SED to read the file, it could substitute the values in the init.ora file.
Something like '1,$ s/NEWSCHEMA/<name of new schema>/w init.ora'. Obviously '<name of new schema>' is the variable I'd like to change.
Can I read this value from a file and use SED to change the file?
I cannot get the syntax down for the read instruction:
1,$ r infile s/NEWSCHEMA/<name of new schema>/