garden2.jpg
vi editor helper


Disclaimer: Apply to a TEST environment first. Use on production systems is at DBAs own risk.

1)

When using vi, use the following syntax to search the currently open file for test and replace it with prod in the entire document.

:%s/test/prod/g

2)

Sometimes when you copy and paste content of for example tnsnames.ora from one file to another in HPUX, if your env is set to autoindent then it becomes very annoying as your vi editor doubles the tabs and the spaces when you paste, to fix this do as follow:

.exrc

This file is located in your home directory $HOME. Do a ls –la to see it.

vi .exrc and set the following from autoindent to noautoindent

set noautoindent

  • This will cause the vi not to put double tabs and spaces.

Latest Blog Items

email

Thank you for your interest in idbasolutions.

Contact us using this email: contact.us@idbasolutions.com