The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
mass file mv Sean2008 Shell Programming and Scripting 2 05-14-2008 12:34 AM
Mass file renaming Indalecio UNIX for Dummies Questions & Answers 5 12-30-2006 05:16 AM
Mass Change mbatchelor Shell Programming and Scripting 3 12-07-2006 10:39 AM
Sending Mass mails iyerdeepa82 UNIX for Dummies Questions & Answers 1 03-10-2006 03:03 PM
mass delete a certain string in a .log file jalge2 UNIX for Dummies Questions & Answers 4 07-27-2005 09:25 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-13-2006
Browser_ice Browser_ice is offline
Registered User
  
 

Join Date: Nov 2005
Location: Canada
Posts: 110
VI questions : mass changes, mass delete and external insert

Is it possible in VI to do a global change but take the search patterns and the replacement patterns from an external file ?

I have cases where I can have 100,200 or 300+ global changes to do. All the new records are inside a file and I must VI a work file to change all of them.


Also, can I do a mass delete on records given by an external file no matter where those records are in VI ?

And insert content of a whole file at any given point in VI ?


I do not think I have autority to replace or recreate the files I am editing at the office. Only the search pattern files I can create as I like.
  #2 (permalink)  
Old 12-13-2006
marlonus999's Avatar
marlonus999 marlonus999 is offline
Registered User
  
 

Join Date: Dec 2006
Location: Manila
Posts: 27
mass changes,delete,insert

I think a more appropriate solution is to use sed.

$ sed -f script_file file_to_be_changed

script_file contains the many search and replace operations you have...like:
....
s/abc/def/g
s/^[a-z]/x/g
/pattern/d
......


$ man sed (to know more)
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:33 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0