Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • GSQ.sql Oracle
  • grep multuple patterns Linux/Unix
  • get_vmstat_solaris Oracle
  • Add new columns in dataframe Python/PySpark
  • Convert multiple rows to single column Oracle
  • Ports used by Oracle Software Oracle
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle
  • tblwopk.sql tablewopk.sql Oracle
  • currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql Oracle
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle
  • send attachment from unix-shell script Linux/Unix
  • Guide to Linux System Command Mastery Linux/Unix
  • chk_space_SID.ksh Linux/Unix
  • findx.sql /* Find Indexes on specified USER.TABLE_NAME */ Oracle
  • Difference between SYNC and AFFIRM Oracle

Search and replace editor command in vi

Posted on 28-Jul-2006 By Admin No Comments on Search and replace editor command in vi

To search and replace between line1 and line2 use following:

(*) This is vi editor command:

following command will serach and replace whole file. (this is default with %s).

:line1,$ s/old_string/new_string/g

following command will search and replace only in specific lines:

:line1,line2 s/old_string/new_string/g

for example,

:3,5 s/CIF/UOC/g

above command will replace CIF with UOC in lines 3,4 and 5.

Linux/Unix, shell

Post navigation

Previous Post: Find average Row Length and other table size calculation. metalink notes
Next Post: get_vmstat.ksh for Solaris

Related Posts

  • Generate SSH without password authentication. Linux/Unix
  • SAN Linux/Unix
  • Space padding in korn shell Linux/Unix
  • Running some SQL on multiple databases connecting using monitoring userid and password Linux/Unix
  • set_env_dba Linux/Unix
  • tar and untar a dolder with all its subfolder. Linux/Unix

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Finding Oracle Patches with opatch Oracle
  • First Entry in RAC Oracle
  • get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause Oracle
  • Rman Notes -1 Oracle
  • Find nth max and min. Oracle
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • To seee semaphores and shared memory segments in Solaris Linux/Unix
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme