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
Grab a smaller and larger value Raynon Shell Programming and Scripting 3 10-11-2007 07:23 AM
grab the line using awk cdfd123 Shell Programming and Scripting 1 10-10-2007 09:21 AM
search and grab data from a huge file ting123 UNIX for Dummies Questions & Answers 1 06-06-2006 10:41 PM
How to concatenate two strings or several strings into one string in B-shell? fontana Shell Programming and Scripting 2 08-26-2005 12:58 PM
How to Grab the latest file n9ninchd UNIX for Dummies Questions & Answers 1 05-10-2001 05:31 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-05-2006
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
Do you always get

xxxx
yyy
zzz
blah
blah

i.e. 5 lines or does the number vary ?
  #2 (permalink)  
Old 10-05-2006
Raynon Raynon is offline
Registered User
  
 

Join Date: Sep 2006
Location: Sg
Posts: 350
Quote:
Originally Posted by vino
Do you always get

xxxx
yyy
zzz
blah
blah

i.e. 5 lines or does the number vary ?
Hi Vino,

The number of lines do vary
  #3 (permalink)  
Old 10-05-2006
vish_indian vish_indian is offline
Registered User
  
 

Join Date: Jun 2006
Location: Delhi, India
Posts: 92
Quote:
Originally Posted by Raynon
** 05T00NPQSMR1 P98P2234 Tue 10 03 09:57:24 2006
** dibid= 1166 testerid= 6
** sample= 100 0
** tasM= MFMM xx xx xx
** tasC= MFMC xx xx xx
************************************
xxxx
yyy
zzz
blah
blah
**********************************************************
** 05T00NPQSMR1 P98P2234 Tue 10 03 09:57:24 2006
** dibid= 1166 testerid= 6
** sample= 100 0
** tasM= MFMM xx xx xx
** tasC= MFMC xx xx xx
************************************


You get it twice because the same pattern occurs in the file 2 times. Will there be any difference in the pattern occurences?
  #4 (permalink)  
Old 10-05-2006
Raynon Raynon is offline
Registered User
  
 

Join Date: Sep 2006
Location: Sg
Posts: 350
Quote:
Originally Posted by vish_indian
You get it twice because the same pattern occurs in the file 2 times. Will there be any difference in the pattern occurences?
Hi Vish,

I understand now. So if there's a difference in the pattern, it will output my desired output. Thanks.

Could you pls explain your code in details because i;m not familiar with sed ?
Closed Thread

Bookmarks

Tags
regex, regular expressions

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 05:55 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