Sponsored Content
Top Forums Shell Programming and Scripting print certain pattern from 2 lines Post 302247199 by ali560045 on Wednesday 15th of October 2008 07:11:43 AM
Old 10-15-2008
print certain pattern from 2 lines

i have 2 lines comming out of a script o/p.below the line.

2008-10-14 05:47:05,551 [Thread-6] INFO - LPBatch: [null, 1-GH32X, null, DC:Tue Oct 14 10:12:37 UTC 2008, null, null, Mon Oct 13 05:00:00 CDT 2008, Mon Oct 13 10:00:00 UTC 2008, Tue Oct 14 04:45:00 CDT 2008, Tue Oct 14 09:45:00 UTC 2008, CC, AMR, 94]

2008-10-14 05:47:05,575 [Thread-6] INFO - Number of Intervals Not Inserted: 1 / 95

--------------------------------------------------------------------------

How to print the below o/p from the above 2 lines:

1-GH32X|CC|AMR|Number of Intervals Not Inserted: 1 / 95

------------------------------------------------------------------------

like wise my final o/p varies depending on the above 2 lines but it has to print in this fashion.plz help me in this
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print the above and below lines for the grep pattern.

Hi, i would like to get the above and below lines of the grep pattern . For ex : file as below: chk1- aaaa 1-Nov chk2 -aaaa ########## chk1-bbbbbb 1-Nov chk2-bbbbbb ######### my search pattern is date : 1-Nov i need the o/p as below chk1- aaaa 1-Nov (6 Replies)
Discussion started by: expert
6 Replies

2. Shell Programming and Scripting

print lines up to pattern excluding pattern

11 22 33 44 55 66 77 When pattern 55 is met, print upto it, so output is 11 22 33 44 (1 Reply)
Discussion started by: anilcliff
1 Replies

3. Shell Programming and Scripting

Print lines before and after pattern match

I am using Solaris, I want to print 3 lines before pattern match pattern 5 lines after pattern match Pattern is abcd to be searched in a.txt. Looking for the solution in sed/awk/perl. Thanks .. Input File a.txt: ================= 1 2 3 abcd 4 5 6 7 8 (7 Replies)
Discussion started by: manuswami
7 Replies

4. Shell Programming and Scripting

Need one liner to search pattern and print everything expect 6 lines from where pattern match made

i need to search for a pattern from a big file and print everything expect the next 6 lines from where the pattern match was made. (8 Replies)
Discussion started by: chidori
8 Replies

5. Shell Programming and Scripting

Print lines before after pattern meacted

Hi All, Am trying to print pervious lines of the pattern matched, I was able to print pattern matched and the required data but don't know how to get the pervious line. ifconfig -a | grep 10.118.67.33 | sed -e 's/^]*//' -e 's/]*$//' | awk '{FS=" "; print $6}' output I... (2 Replies)
Discussion started by: Optimus81
2 Replies

6. Shell Programming and Scripting

How to print the lines between two pattern in a file?

file like: services: XXXXXXXX: XXXXXXX: XXXXXXXXX1 XXXXX XXXXXXXXX DDDDDDDDDDD BBBBB: version: 11.2.0.4 services: YYYYYYYYYY XXXXXXXXXX: XXXXXXXXX XXXXXXXX XXXXXXXXX... (5 Replies)
Discussion started by: netbanker
5 Replies

7. Shell Programming and Scripting

Match Pattern and print pattern and multiple lines into one line

Hello Experts , require help . See below output: File inputs ------------------------------------------ Server Host = mike id rl images allocated last updated density vimages expiration last read <------- STATUS ------->... (4 Replies)
Discussion started by: tigerhills
4 Replies

8. AIX

Grep a pattern and print following n lines

Hi all, I am struck with the below requirement. I need to grep a particular pattern in a file and then print next n lines of it for further processing. I have used the below code grep -A 3 "pattern" filename But it is throwing error as below. grep: illegal option -- A Can... (14 Replies)
Discussion started by: ssk250
14 Replies

9. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

The intended result should be : PDF converters 'empty line' gpdftext and pdftotext?xml version="1.0"?> xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies

10. Shell Programming and Scripting

Print lines after matching two pattern

would like to print everything after matching two patterns AAA and BBB. output : CCC ZZZ sample data : AAA BBB CCC ZZZ (4 Replies)
Discussion started by: jhonnyrip
4 Replies
DateTime::Locale::en_GU(3)				User Contributed Perl Documentation				DateTime::Locale::en_GU(3)

NAME
DateTime::Locale::en_GU SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'en_GU' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for English Guam. DATA
This locale inherits from the DateTime::Locale::en locale. It contains the following data. Days Wide (format) Monday Tuesday Wednesday Thursday Friday Saturday Sunday Abbreviated (format) Mon Tue Wed Thu Fri Sat Sun Narrow (format) M T W T F S S Wide (stand-alone) Monday Tuesday Wednesday Thursday Friday Saturday Sunday Abbreviated (stand-alone) Mon Tue Wed Thu Fri Sat Sun Narrow (stand-alone) M T W T F S S Months Wide (format) January February March April May June July August September October November December Abbreviated (format) Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Narrow (format) J F M A M J J A S O N D Wide (stand-alone) January February March April May June July August September October November December Abbreviated (stand-alone) Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Narrow (stand-alone) J F M A M J J A S O N D Quarters Wide (format) 1st quarter 2nd quarter 3rd quarter 4th quarter Abbreviated (format) Q1 Q2 Q3 Q4 Narrow (format) 1 2 3 4 Wide (stand-alone) 1st quarter 2nd quarter 3rd quarter 4th quarter Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide Before Christ Anno Domini Abbreviated BC AD Narrow B A Date Formats Full 2008-02-05T18:30:30 = Tuesday, February 5, 2008 1995-12-22T09:05:02 = Friday, December 22, 1995 -0010-09-15T04:44:23 = Saturday, September 15, -10 Long 2008-02-05T18:30:30 = February 5, 2008 1995-12-22T09:05:02 = December 22, 1995 -0010-09-15T04:44:23 = September 15, -10 Medium 2008-02-05T18:30:30 = Feb 5, 2008 1995-12-22T09:05:02 = Dec 22, 1995 -0010-09-15T04:44:23 = Sep 15, -10 Short 2008-02-05T18:30:30 = 2/5/08 1995-12-22T09:05:02 = 12/22/95 -0010-09-15T04:44:23 = 9/15/-10 Default 2008-02-05T18:30:30 = Feb 5, 2008 1995-12-22T09:05:02 = Dec 22, 1995 -0010-09-15T04:44:23 = Sep 15, -10 Time Formats Full 2008-02-05T18:30:30 = 6:30:30 PM UTC 1995-12-22T09:05:02 = 9:05:02 AM UTC -0010-09-15T04:44:23 = 4:44:23 AM UTC Long 2008-02-05T18:30:30 = 6:30:30 PM UTC 1995-12-22T09:05:02 = 9:05:02 AM UTC -0010-09-15T04:44:23 = 4:44:23 AM UTC Medium 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM Short 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM Default 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM Datetime Formats Full 2008-02-05T18:30:30 = Tuesday, February 5, 2008 6:30:30 PM UTC 1995-12-22T09:05:02 = Friday, December 22, 1995 9:05:02 AM UTC -0010-09-15T04:44:23 = Saturday, September 15, -10 4:44:23 AM UTC Long 2008-02-05T18:30:30 = February 5, 2008 6:30:30 PM UTC 1995-12-22T09:05:02 = December 22, 1995 9:05:02 AM UTC -0010-09-15T04:44:23 = September 15, -10 4:44:23 AM UTC Medium 2008-02-05T18:30:30 = Feb 5, 2008 6:30:30 PM 1995-12-22T09:05:02 = Dec 22, 1995 9:05:02 AM -0010-09-15T04:44:23 = Sep 15, -10 4:44:23 AM Short 2008-02-05T18:30:30 = 2/5/08 6:30 PM 1995-12-22T09:05:02 = 12/22/95 9:05 AM -0010-09-15T04:44:23 = 9/15/-10 4:44 AM Default 2008-02-05T18:30:30 = Feb 5, 2008 6:30:30 PM 1995-12-22T09:05:02 = Dec 22, 1995 9:05:02 AM -0010-09-15T04:44:23 = Sep 15, -10 4:44:23 AM Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 Tue 1995-12-22T09:05:02 = 22 Fri -0010-09-15T04:44:23 = 15 Sat Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (M/d) 2008-02-05T18:30:30 = 2/5 1995-12-22T09:05:02 = 12/22 -0010-09-15T04:44:23 = 9/15 MEd (E, M/d) 2008-02-05T18:30:30 = Tue, 2/5 1995-12-22T09:05:02 = Fri, 12/22 -0010-09-15T04:44:23 = Sat, 9/15 MMM (LLL) 2008-02-05T18:30:30 = Feb 1995-12-22T09:05:02 = Dec -0010-09-15T04:44:23 = Sep MMMd (MMM d) 2008-02-05T18:30:30 = Feb 5 1995-12-22T09:05:02 = Dec 22 -0010-09-15T04:44:23 = Sep 15 MMMEd (E, MMM d) 2008-02-05T18:30:30 = Tue, Feb 5 1995-12-22T09:05:02 = Fri, Dec 22 -0010-09-15T04:44:23 = Sat, Sep 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = February 5 1995-12-22T09:05:02 = December 22 -0010-09-15T04:44:23 = September 15 MMMMEd (E, MMMM d) 2008-02-05T18:30:30 = Tue, February 5 1995-12-22T09:05:02 = Fri, December 22 -0010-09-15T04:44:23 = Sat, September 15 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (M/yyyy) 2008-02-05T18:30:30 = 2/2008 1995-12-22T09:05:02 = 12/1995 -0010-09-15T04:44:23 = 9/-010 yMEd (EEE, M/d/yyyy) 2008-02-05T18:30:30 = Tue, 2/5/2008 1995-12-22T09:05:02 = Fri, 12/22/1995 -0010-09-15T04:44:23 = Sat, 9/15/-010 yMMM (MMM y) 2008-02-05T18:30:30 = Feb 2008 1995-12-22T09:05:02 = Dec 1995 -0010-09-15T04:44:23 = Sep -10 yMMMEd (EEE, MMM d, y) 2008-02-05T18:30:30 = Tue, Feb 5, 2008 1995-12-22T09:05:02 = Fri, Dec 22, 1995 -0010-09-15T04:44:23 = Sat, Sep 15, -10 yMMMM (MMMM y) 2008-02-05T18:30:30 = February 2008 1995-12-22T09:05:02 = December 1995 -0010-09-15T04:44:23 = September -10 yQ (Q yyyy) 2008-02-05T18:30:30 = 1 2008 1995-12-22T09:05:02 = 4 1995 -0010-09-15T04:44:23 = 3 -010 yQQQ (QQQ y) 2008-02-05T18:30:30 = Q1 2008 1995-12-22T09:05:02 = Q4 1995 -0010-09-15T04:44:23 = Q3 -10 Miscellaneous Prefers 24 hour time? No Local first day of the week Sunday SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.18.2 2017-10-06 DateTime::Locale::en_GU(3)
All times are GMT -4. The time now is 08:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy