Skip to content

Instantly share code, notes, and snippets.

@wdjunaidi
Created March 19, 2012 03:21
Show Gist options
  • Save wdjunaidi/2092854 to your computer and use it in GitHub Desktop.
Save wdjunaidi/2092854 to your computer and use it in GitHub Desktop.
Vim search replace of IBM Portal wklpc_dbdomain.properties
# Replace all non commented DbType entries with new <DBTYPE>
:%s/^\([^#].*\.DbType\)=.*/\1=<DBTYPE>/
# Replace all non commented DbName entries with new <DBNAME>
:%s/^\([^#].*\.DbName\)=.*/\1=<DBNAME>/
# Replace all non commented DbSchema entry with WPSD_<UPPERCASE_DATABASE>
:%s/^\([^#].*\)\.DbSchema=.*/\1.DbSchema=WPSD_\U\1/
# Replace all non commented DataSourceName entry with wpsdDS_<database>
:%s/^\([^#].*\)\(\.DataSourceName\)=.*/\1\2=wpsdDS_\1/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment