[Solved] Vi - replace words with points (.)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers [Solved] Vi - replace words with points (.)
# 1  
Old 10-22-2010
[Solved] Vi - replace words with points (.)

Hello guys,

I'm trying to replace the word "i.e." for "ie." in Vi but everytime I used the search tool for start looking for it (this is: /i.e.), it finds every word that contains the "i" and "e" word. I tried the following command:

Code:
:%s/i.e./ie./g

However, it doesn't work.

Any help is greatly appreciated.

Thanks in advance
# 2  
Old 10-22-2010
Code:
:%s/i\.e\./ie\./g

# 3  
Old 10-22-2010
Many thanks ctsgnb, it worked perfectly.

Cheers
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace particular words in file based on if finds another words in that line

Hi All, I need one help to replace particular words in file based on if finds another words in that file . i.e. my self is peter@king. i am staying at north sydney. we all are peter@king. How to replace peter to sham if it finds @king in any line of that file. Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies

2. Shell Programming and Scripting

How to replace multiple words together?

I am looking for any smart perl solution for multiple word replacement together. My awk is working but for big files it is superslow. awk 'NR==FNR {a=$2;next} {for ( i in a) gsub(i,a)}1' new_word_list.txt oldfile > newfile new_word_list.txt looks like AB733 ST756 AB734 ST219 AB11 ... (4 Replies)
Discussion started by: sammy777888
4 Replies

3. UNIX for Dummies Questions & Answers

Replace the words in the file to the words that user type?

Hello, I would like to change my setting in a file to the setting that user input. For example, by default it is ONBOOT=ON When user key in "YES", it would be ONBOOT=YES -------------- This code only adds in the entire user input, but didn't replace it. How do i go about... (5 Replies)
Discussion started by: malfolozy
5 Replies

4. Shell Programming and Scripting

[Solved] sed to replace words

Hello All, I have file named filelist.txt a.bteq.ctl b.bteq.ctl c.bteq.ctl I want to replace the word bteq to tpt in this file. I used this sed command cat filelist.txt | sed 's/bteq/tpt/g' > filelist.txt But this command deletes all records from the filelist.txt Can... (2 Replies)
Discussion started by: nnani
2 Replies

5. Shell Programming and Scripting

perl : replace multiline text between two marker points

Hi there I just wondered if someone could give me some perl advice I have a bunch of text files used for a wiki that have common headings such as ---++ Title blah ---++ Summary blah ---++ Details Here is the multiline block of text I wish to (6 Replies)
Discussion started by: rethink
6 Replies

6. Shell Programming and Scripting

Shell script to find out words, replace them and count words

hello, i 'd like your help about a bash script which: 1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel, 2.finds the link which leads to the download location of the Latest Stable Kernel version, (the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies

7. UNIX for Dummies Questions & Answers

Replace a string within 2 points and save it

I've got this xml file <file1> some text here </file1> <file2> some text here </file2> How do I change the text in element file1 to a sentence that I want, defined by variable $sentence. using ksh here. (2 Replies)
Discussion started by: alienated
2 Replies

8. UNIX and Linux Applications

Gnuplot question: how to plot 3D points as colored points in map view?

I have a simple gnuplot question. I have a set of points (list of x,y,z values; irregularly spaced, i.e. no grid) that I want to plot. I want the plot to look like this: - points in map view (no 3D view) - color of each point should depend on its z-value. - I want to define my own color scale -... (0 Replies)
Discussion started by: karman
0 Replies

9. Shell Programming and Scripting

Search and replace string between 2 points

I have a file that contains the following string. connect odemgr/bank123@odsd I am liiking to write a scrupt that will change the par of the string between the "/" and the "@" anyhelp qwould be greatly appriciated. (3 Replies)
Discussion started by: whited05
3 Replies
Login or Register to Ask a Question