The UNIX and Linux Forums  


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
Help with selecting specific lines in a large file tansha UNIX for Dummies Questions & Answers 2 02-06-2008 08:26 AM
Urgent: selecting unique specific content of a file using shell script jisha Shell Programming and Scripting 2 01-08-2008 08:45 AM
Replacing a paragraph between pattern , with the content 4m another file go4desperado Shell Programming and Scripting 4 12-07-2006 09:44 AM
Archiving Files by selecting years file created dmhammond UNIX for Dummies Questions & Answers 2 06-13-2005 03:12 PM
Selecting records from file on criteria. videsh77 Shell Programming and Scripting 7 12-29-2004 02:20 PM

Closed Thread
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
  #1 (permalink)  
Old 10-04-2005
swamymns swamymns is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 25
selecting each paragraph and put it into a file...help me

Dear Friends,
I need a shell script.
I am facing a problem while selecting the text that is between start and end tags. and insert the paragraph into a file1, next paragraph in file2......
experts please help.

i have a file which contains,
--------------
<abc> 111some text some text
some text some text
some text some text
some text some text
some text </abc>
===blank line======
<abc>222 some text some text
some text some text
some text some text
some text some text
some text </abc>
===blank line======
<abc> 333some text some text
some text some text
some text some text
some text some text
some text </abc>
-------------------------------

I want to get the text that started with <abc> and end with </abc> and put it into a file.
i.e.,

file1 should contain following text,
<abc>111 some text some text
some text some text
some text some text
some text some text
some text </abc>

file2 should contain following text,
<abc>222 some text some text
some text some text
some text some text
some text some text
some text </abc>

and

file3 should contain following text,
<abc>333 some text some text
some text some text
some text some text
some text some text
some text </abc>

it will be a great help if any one can gives the solution.

Thanks in Advance,
Narayanaswamy M
  #2 (permalink)  
Old 10-04-2005
swamymns swamymns is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 25
vary urgent please help me....please

Dear Friends,
I need a shell script.
I am facing a problem while selecting the text that is between start and end tags. and insert the paragraph into a file1, next paragraph in file2......
experts please help.

i have a file which contains,
--------------
<abc> 111some text some text
some text some text
some text some text
some text some text
some text </abc>
===blank line======
<abc>222 some text some text
some text some text
some text some text
some text some text
some text </abc>
===blank line======
<abc> 333some text some text
some text some text
some text some text
some text some text
some text </abc>
-------------------------------

I want to get the text that started with <abc> and end with </abc> and put it into a file.
i.e.,

file1 should contain following text,
<abc>111 some text some text
some text some text
some text some text
some text some text
some text </abc>

file2 should contain following text,
<abc>222 some text some text
some text some text
some text some text
some text some text
some text </abc>

and

file3 should contain following text,
<abc>333 some text some text
some text some text
some text some text
some text some text
some text </abc>

it will be a great help if any one can gives the solution.

Thanks in Advance,
Narayanaswamy M
  #3 (permalink)  
Old 10-04-2005
tmarikle tmarikle is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2005
Posts: 683
You have already been given the advice in this thread
  1. The rules state that you aren't to bump up your questions in order to get an answer more quickly. You keep doing this and have indicated that you have read the rules completely.
  2. You were already given advice and you aren't likely to get any closer to solving your "urgent" problem until you work with the advice that you were already given. What was your conclusion from reading the man page for "awk"?
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 04:20 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