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 > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-23-2008
chada chada is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 2
help needed for substitution

Hello folks,

I need some help in substitutions either using sed , awk or vi for the following problem.

I have the following lines in a file say xyz.file

END EN
PIN CLK
DIRECTION INPUT ;
PORT
LAYER VIA10 ;
RECT 0.xyz 0.807 0.5 0.857 ;
LAYER M02 ;
RECT 0.078 0.8 0.349 0.8 ;
END
END CLK
PIN VDD
DIRECTION INPUT ; --> change INPUT TO INOUT
USE POWER ;
PORT
LAYER VIA10 ;
RECT 0.820 1


I want to change the "DIRECTION INPUT" to "DIRECTION INOUT" only after the strings "PIN VDD" or " PIN VSS"

How can i accomplish this?

Appreciate your inputs on this.

Thanks!