For example, you wish to update a pfile for a database TEST to be used for database DEV. You would use the following command:
$ vi initTEST.ora(From within VI perform the next steps:):1,$ s/TEST/DEV/gcWhat the Code Means:
:- in vi this allows you to enter a command1,$- perform this command wherever you see the word to replaces- substitute command/TEST/- match word, the /tells Vi the beginning of the word is to follow, the / tells vi that the word has ended.DEV/- text to replace withg- change every occurance on the line not just the first one, this is the global flagc- ask before committing, this allows you to confirm you wish each occurance to be changed as vi picks it up.
No comments:
Post a Comment
Please feel free to leave a comment