Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Changing the Global Database Name Oracle
  • SQL_PLAN.sql for checking real execution plan Oracle
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • DBMS_STATS Metalinks Notes Oracle
  • How to check current redo log progress redo_progress.sql Oracle
  • RMAN : Consistent Backup, Restore and Recovery using RMAN Oracle
  • initUOCIOTTO.ora Oracle
  • Histogram information Oracle
  • How to hide author name in WordPress BLOG PHP/MYSQL/Wordpress
  • Small sample shell program Linux/Unix
  • Directory wise folder wise space usage Linux/Unix
  • secure crt settings Linux/Unix
  • export import with parameter file. Oracle
  • Locktree.sql Oracle
  • scp with ssh2 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

  • Running select from V$ views from remote server Linux/Unix
  • replacing ^M character when passing files from Windows to Unix Linux/Unix
  • How to sort list of files on basis of their sizes. Linux/Unix
  • To seee semaphores and shared memory segments in Solaris Linux/Unix
  • secure crt settings Linux/Unix
  • find the files that are 1 day old. 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 (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Logic to chech # of parameters command line parameters Linux/Unix
  • sql_doing_fts.sql Oracle
  • Optimizer SORT Operations Oracle
  • Sort with ASCII order and Numeric Order Linux/Unix
  • Oracle Material from OTN Oracle
  • How does one SELECT a value from a table into a Unix variable? From SQL to Shell Linux/Unix
  • rm_backup_arch_file.ksh Linux/Unix
  • Rename Tablespace Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme