Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Ports used by Oracle Software Oracle
  • Oracle 10g Installation/Applying Patches Tips Oracle
  • cp_filesystem.sql Oracle
  • find_du.ksh to find # of files, their sizes in current folder and its subdolder Linux/Unix
  • cur_sql.sql Oracle
  • Day to day MYSQL DBA operations (Compared with Oracle DBA) MYSQL
  • Sort with ASCII order and Numeric Order Linux/Unix
  • Generate SSH without password authentication. Linux/Unix
  • chk_space_SID.ksh Linux/Unix
  • To Find Orphan OS processes. Linux/Unix
  • Rman Notes -1 Oracle
  • Follwoing korn shell is used to move files from source folder to destination folder and gzip it in destination folder. mv_iotto.ksh Linux/Unix
  • Goldengate document from Porus Oracle
  • alter database backup controlfile to trace Oracle
  • Order by with ROWNUM 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

  • Nice Article about semaphores and init.ora Processes parameter relations Linux/Unix
  • Some OS level threshold for performance. Linux/Unix
  • CPU speed on solaris Linux/Unix
  • process id based files and processes Linux/Unix
  • scripts to take listener.log backup Linux/Unix
  • chk_space_SID.ksh Linux/Unix

Leave a Reply Cancel reply

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

Categories

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

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Check_recovery.sh program to run sqlplus and return its values remotely. Linux/Unix
  • oracle tips… from http://www.bijoos.com/oracle/douknow.htm Oracle
  • Unix split command to split files Linux/Unix
  • Shuffle an array PHP/MYSQL/Wordpress
  • get_vmstat.ksh for Solaris Oracle
  • tblwopk.sql tablewopk.sql Oracle
  • Very clear article about oracle dataguard Oracle
  • Search and replace pattern Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme