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
select some text from a test dependng on pattern mnmonu Shell Programming and Scripting 3 06-02-2009 12:39 AM
Select everything before a pattern usha rao Shell Programming and Scripting 15 05-19-2009 03:25 PM
extract/select pattern from input TehOne Shell Programming and Scripting 4 10-15-2008 02:55 AM
How to select lines in unix matches a pattern at a particular position cs_banda UNIX for Dummies Questions & Answers 2 10-06-2006 03:28 PM
Search file for pattern and grab some lines before pattern frustrated1 Shell Programming and Scripting 2 12-22-2005 03:41 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-08-2009
DTechBuddy DTechBuddy is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 17
Select a pattern from file

Hi,

I have a requirement to select only a specific pattern from a flat file and delete its occurance.
For eg.
If my file contains :
Code:
<A1>1234</A1>
<A2>5678</A2>
<ABC>1234</ABC>
<A3>0987</A3>
Then, i want to delete <ABC>1234</ABC> from the file and have the contents as :-
Code:
<A1>1234</A1>
<A2>5678</A2>
<A3>0987</A3>
How can i identify the occurance of this pattern?
Contents inside the tag<ABC>can change in various file.

Thanks in advance.

Last edited by Yogesh Sawant; 07-09-2009 at 04:35 AM.. Reason: added code tags
 

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 12:25 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