Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • tblwopk.sql tablewopk.sql Oracle
  • export import with parameter file. Oracle
  • Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql Oracle
  • Set Role explaination. Oracle
  • Export Import with QUERY Oracle
  • exp syntax in oracle 10g Oracle
  • proper cpu stats Linux/Unix
  • Single character replacement in Unix Linux/Unix
  • When to rebuld B-tree index Oracle
  • Rename Oracle Instance Name Oracle
  • Search and Replace vi editor command. Linux/Unix
  • Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository Oracle
  • Standby Database Behavior when a Datafile is Resized on the Primary Database Note:123883.1 Oracle
  • plan10g.sql good Oracle
  • chk_space_SID.ksh 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

  • Jai Shree Ram Linux/Unix
  • move_arch_files.ksh Linux/Unix
  • scripts to take listener.log backup Linux/Unix
  • Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets. Linux/Unix
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • replace alphabets using sed 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 (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • 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

  • 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
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Another export with Query Oracle
  • Single character replacement in Unix Linux/Unix
  • FRA Information. Oracle
  • Changing unix system clock when Oracle database is running. Oracle
  • How to know current SID Oracle
  • Korn Shell Arithmatic Linux/Unix
  • find_log_switch.sql Find log switches in graphical manner Oracle
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme