Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • New OFA for 11g Oracle
  • configUOCIOTTO.ora Oracle
  • Specify the Rollback segment to use in Transaction Oracle
  • Caching sequence in Memory Oracle
  • How to collect CPU usage on Linux using Shell script Linux/Unix
  • _B_TREE_BITMAP_PLANS issue during 8.1.7 to 9.2.0.8 upgrade Oracle
  • refre.sql for multitenant Oracle
  • Session_info.ksh Linux/Unix
  • Important Solaris Commands Linux/Unix
  • Oracle Statspack survival Guide Oracle
  • crontab syntax Linux/Unix
  • Jai Shree Ram Oracle
  • Library cahe Latches and internal explaination Oracle
  • Free conference number from http://www.freeconference.com Oracle
  • How to sort list of files on basis of their sizes. Linux/Unix

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

  • Remove DOS CR/LFs (^M) Linux/Unix
  • scripts to take listener.log backup Linux/Unix
  • How to change hostname in Linux Linux/Unix
  • check_copy_progress.sh Linux/Unix
  • proper cpu stats Linux/Unix
  • to see when crontab is changed. 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)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (397)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (345)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026
  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • 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

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Goldengate Tutorial Oracle
  • How to find where datafile is created dbf_info.sql Oracle
  • GSQ.sql Oracle
  • New OFA for 11g Oracle
  • UNderstand and eliminate Latch contention. Oracle
  • Logic to chech # of parameters command line parameters Linux/Unix
  • Remove duplicate rows from table Oracle
  • Wait.sql Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme