vi editor

Tags
solaris

 
Thread Tools Search this Thread
# 1  
Old 05-04-2006
vi editor

suppose i have a lines as follows

-rw-r----- 1 ora92 orainst 104846848 Jan 15 2005 0001_0000003971.arc
-rw-r----- 1 ora92 orainst 104851456 Jan 15 2005 0001_0000003972.arc
-rw-r----- 1 ora92 orainst 104852992 Jan 15 2005 0001_0000003973.arc
-rw-r----- 1 ora92 orainst 104855040 Jan 15 2005 0001_0000003974.arc
-rw-r----- 1 ora92 orainst 104846848 Jan 15 2005 0001_0000003975.arc
-rw-r----- 1 ora92 orainst 104849408 Jan 15 2005 0001_0000003976.arc
-rw-r----- 1 ora92 orainst 104844288 Jan 15 2005 0001_0000003977.arc
-rw-r----- 1 ora92 orainst 104856576 Jan 15 2005 0001_0000003978.arc

I want to replace
-rw-r----- 1 ora92 orainst 104846848 Jan 15
portion with mv for all the lines.

Any suggestions from anyone??

Dip
# 2  
Old 05-04-2006
:%s/.*15/mv/
should do it. But you really want that 2005 to stay put??
# 3  
Old 05-04-2006
vi editor

Thnx for reply but this did not work
# 4  
Old 05-04-2006
Make sure that there is no space between % ans s or use an explicit line number range:

:1,$ s/.*15/mv/
# 5  
Old 05-04-2006
vi editor

nothing is working
# 6  
Old 05-04-2006
Quote:
Originally Posted by diptiman
nothing is working
Paste into a reply to this thread exactly what you are typing into VI and we'll tell you what you are doing wrong. Perhaps you are in Insert mode while you are trying to make this work. Hit Escape before typing it in.
# 7  
Old 05-05-2006
vi editor

well i am aware of the insert mode and ex mode. and i am in ex mode when i am running this commands. can you specify me the blank spaces in the command. i think that will help me.

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
What editor does everyone use? yongho Open Source 401 5 Days Ago 05:58 AM
How can I do this in VI editor? kraljic Shell Programming and Scripting 9 03-09-2013 10:47 PM
Help with vi editor gonchusirsa UNIX for Dummies Questions & Answers 1 01-19-2013 12:55 AM
Vi Editor Sudip_Felipemas UNIX for Dummies Questions & Answers 6 02-02-2012 08:01 AM
Help in Vi Editor gameboy87 Programming 2 09-16-2011 11:05 PM
Vi editor jazz Programming 2 05-08-2009 09:46 AM
Epic Editor was not able to obtain a license for your use. Feature Epic Editor :Licen durgaprasadr13 Solaris 1 10-13-2008 08:39 AM
set EDITOR=vi -> default editor not setting for cron tab aarora_98 Shell Programming and Scripting 6 09-13-2008 03:01 AM
Pasting text in VI editor from a different editor harishmitty UNIX for Dummies Questions & Answers 10 09-10-2008 07:22 PM
VI Editor doyindayo UNIX and Linux Applications 3 08-26-2008 09:14 AM
Which editor to use? Nafanja UNIX for Dummies Questions & Answers 5 11-29-2007 12:58 PM
vi editor MaxK UNIX for Dummies Questions & Answers 2 10-18-2006 11:42 PM
best editor annemar UNIX Desktop Questions & Answers 1 10-10-2005 01:05 PM
vi editor alain123456 UNIX for Advanced & Expert Users 3 07-21-2005 12:07 PM
Vi editor ? billy5 Shell Programming and Scripting 2 06-27-2005 05:20 PM