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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
AWK substitution klut Shell Programming and Scripting 4 01-15-2008 11:26 AM
ksh substitution solea Shell Programming and Scripting 2 08-09-2004 05:30 AM
sed substitution jo_aze UNIX for Dummies Questions & Answers 3 06-23-2002 09:32 PM
substitution supercbw Shell Programming and Scripting 1 06-07-2002 03:07 PM
Substitution using sed Ohji UNIX for Dummies Questions & Answers 3 08-17-2001 11:32 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #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!
  #2 (permalink)  
Old 07-23-2008
chada chada is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 2
dont bother i was able to do using sed.

sed '/PIN VDD /{n;s/INPUT/INOUT/ ;}' xyz.file > test_std.file

thanks!
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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