Text Size
   
Home Technology | complicates our life Linux Stuffs How to Find and Replace String in Linux VI
Sep 06
Monday

 

 

          edzofcit.com

 

What's Hot

Tudlo

Tudlo is the easy way to find and review about events, places and establishment.  Everybody knows that asking someone is the best way to find places and establishments. Tudlo collects and organize these recommendations in one convenient site -- and that is Tudlo.com.

Playing

Playing

  • Tribal Wars
  • Call of Duty 4
  • NFS Most Wanted
  • CNC Generals
  • Kanes Wrath
.

Watching

Watching

  • Smallville
  • Heroes
  • Terminator(Sarah Chronicles)
  • Chuck
  • Dexterk
.

Doing

Doing

  • IP Telephony
  • Open Source Technology
  • Web Development
  • Asterisk
.
How to Find and Replace String in Linux VI PDF  | Print |  E-mail
User Rating: / 1
PoorBest 
Written by Administrator   
Wednesday, 28 January 2009 07:38

We already discussed how to Find and Replace String in Linux Command Line in the previous tutorial and now, We will teach you how to do it while editing a file in vi.

To the beginners, vi  is one of many linux text editor and happens to be the favorites of linux techies.

In this tutorial, we will have edzofcit.txt  as our sample text file.

 

#vi edzofcit.txt
Hi, my name is Joseph. Joseph is my name. Edzofcit is my website. Joseph is my first name

To change "Joseph" into "Eddie", press "ESC" + ":" then %s/Joseph/Eddie/g

This may look like this..

 

Hi, my name is Joseph. Joseph is my name. Edzofcit is my website. Joseph is my first name
~
:%s/Joseph/Eddie/g

Last Updated ( Tuesday, 14 July 2009 06:09 )
 

Add your comment

Your name:
Subject:
Comment:
Home Technology | complicates our life Linux Stuffs How to Find and Replace String in Linux VI