Sponsored Content
Top Forums Shell Programming and Scripting Print previous, current and next line using sed Post 302247872 by ysrinu on Thursday 16th of October 2008 02:07:47 PM
Old 10-16-2008
Thanks Jim, this worked.
-srinivas
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use sed to search for string and Print previous two lines and current line

Hello, Can anybody help me to correct my sed syntax to find the string and print previous two lines and current line and next one line. i am using string as "testing" netstat -v | sed -n -e '/test/{x;2!p;g;$!N;p;D;}' -e h i am able to get the previous line current line next line but... (1 Reply)
Discussion started by: nmadhuhb
1 Replies

2. Shell Programming and Scripting

how Print previous line ..........

HELLO...I wanted to ask you, than sure know unix more than me, as I can obtain the following solution: I have a file with rows of the type: CIAO COME STAI PERCHE COME STAI CIAO COME VA ALLO CHE FACCIAMO ................. I would that if in a line is present the word (for example) " CHE... (9 Replies)
Discussion started by: fabi20
9 Replies

3. UNIX for Dummies Questions & Answers

print previous month (current month minus 1) with Solaris date and ksh

Hi folks month=`date +%m`gives current month Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies)
Discussion started by: slashdotweenie
7 Replies

4. Shell Programming and Scripting

Print the previous line

My requirement is that when ever search criteria matchs in log file, the previous line just above the search word as well as search word should be print. sample log file --03-19T11:26 xxx create version "a.sh@@/main/6" "104157 " --03-18T16:01 xxx create version "a.sh@@/main/5" ... (6 Replies)
Discussion started by: jadoo_c2
6 Replies

5. UNIX for Dummies Questions & Answers

Awk to print data from current and previous line

Hi guys, I have found your forum super useful. However, right now I am stuck on a seemingly "simple" thing in AWK. I have two columns of data, the first column in Age (in million years) and the second column is Convergence Rate (in mm/yr). I am trying to process my data so I can use it to... (2 Replies)
Discussion started by: awk_noob_456
2 Replies

6. Shell Programming and Scripting

Perl: Conditional replace based on previous and current value in a line

I need to read the contents of a file. Then I need to grep for a keyword and replace part of the grepped line based on the condition of previous and present line. Example input file: V { port1 = P; port2 = 0; shift_port = P0; /* if next shift_port is P0 I need... (9 Replies)
Discussion started by: naveen@
9 Replies

7. Shell Programming and Scripting

Sed Comparing Parenthesized Values In Previous Line To Current Line

I am trying to delete lines in archived Apache httpd logs Each line has the pattern: <ip-address> - - <date-time> <document-request-URL> <http-response> <size-of-req'd-doc> <referring-document-URL> This pattern is shown in the example of 6 lines from the log in the code box below. These 6... (1 Reply)
Discussion started by: Proteomist
1 Replies

8. Shell Programming and Scripting

awk script -print line when $2 > $2 of previous line

Hi all, From a while loop I am reading a sorted file where I want to print only the lines that have $1 match and $2 only when the difference from $2 from the previous line is > 30. Input would be like ... AN237 010 193019 0502 1 CSU Amoxycillin AN237 080 ... (2 Replies)
Discussion started by: gafoleyo73
2 Replies

9. Shell Programming and Scripting

How to print previous line of multiple pattern matched line?

Hello, I have below format log file, Comparing csv_converted_files/2201/9747.1012H67126.5077292103609547345.csv and csv_converted_files/22019/97447.1012H67126.5077292103609547345.csv Comparing csv_converted_files/2559/9447.1012H67126.5077292103609547345.csv and... (6 Replies)
Discussion started by: arvindshukla81
6 Replies

10. UNIX for Beginners Questions & Answers

awk or sed to print the character from the previous line after the regexp match

Hi All, I need to print the characters in the previous line just before the regular expression match Please have a look at the input file as attached I need to match the regular expression ^ with the character of the previous like and also the pin numbers and the output file should be like... (6 Replies)
Discussion started by: kshitij
6 Replies
DateTime::Locale::om_ET(3)				User Contributed Perl Documentation				DateTime::Locale::om_ET(3)

NAME
DateTime::Locale::om_ET SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'om_ET' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Oromo Ethiopia. DATA
This locale inherits from the DateTime::Locale::om locale. It contains the following data. Days Wide (format) Wiixata Qibxata Roobii Kamiisa Jimaata Sanbata Dilbata Abbreviated (format) Wix Qib Rob Kam Jim San Dil Narrow (format) M T W T F S S Wide (stand-alone) Wiixata Qibxata Roobii Kamiisa Jimaata Sanbata Dilbata Abbreviated (stand-alone) Wix Qib Rob Kam Jim San Dil Narrow (stand-alone) M T W T F S S Months Wide (format) Amajjii Guraandhala Bitooteessa Elba Caamsa Waxabajjii Adooleessa Hagayya Fuulbana Onkololeessa Sadaasa Muddee Abbreviated (format) Ama Gur Bit Elb Cam Wax Ado Hag Ful Onk Sad Mud Narrow (format) J F M A M J J A S O N D Wide (stand-alone) Amajjii Guraandhala Bitooteessa Elba Caamsa Waxabajjii Adooleessa Hagayya Fuulbana Onkololeessa Sadaasa Muddee Abbreviated (stand-alone) Ama Gur Bit Elb Cam Wax Ado Hag Ful Onk Sad Mud Narrow (stand-alone) J F M A M J J A S O N D Quarters Wide (format) Q1 Q2 Q3 Q4 Abbreviated (format) Q1 Q2 Q3 Q4 Narrow (format) 1 2 3 4 Wide (stand-alone) Q1 Q2 Q3 Q4 Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide BCE CE Abbreviated KD KB Narrow KD KB Date Formats Full 2008-02-05T18:30:30 = Qibxata, Guraandhala 5, 2008 1995-12-22T09:05:02 = Jimaata, Muddee 22, 1995 -0010-09-15T04:44:23 = Sanbata, Fuulbana 15, -10 Long 2008-02-05T18:30:30 = 05 Guraandhala 2008 1995-12-22T09:05:02 = 22 Muddee 1995 -0010-09-15T04:44:23 = 15 Fuulbana -10 Medium 2008-02-05T18:30:30 = 05-Gur-2008 1995-12-22T09:05:02 = 22-Mud-1995 -0010-09-15T04:44:23 = 15-Ful--10 Short 2008-02-05T18:30:30 = 05/02/08 1995-12-22T09:05:02 = 22/12/95 -0010-09-15T04:44:23 = 15/09/-10 Default 2008-02-05T18:30:30 = 05-Gur-2008 1995-12-22T09:05:02 = 22-Mud-1995 -0010-09-15T04:44:23 = 15-Ful--10 Time Formats Full 2008-02-05T18:30:30 = 6:30:30 WB UTC 1995-12-22T09:05:02 = 9:05:02 WD UTC -0010-09-15T04:44:23 = 4:44:23 WD UTC Long 2008-02-05T18:30:30 = 6:30:30 WB UTC 1995-12-22T09:05:02 = 9:05:02 WD UTC -0010-09-15T04:44:23 = 4:44:23 WD UTC Medium 2008-02-05T18:30:30 = 6:30:30 WB 1995-12-22T09:05:02 = 9:05:02 WD -0010-09-15T04:44:23 = 4:44:23 WD Short 2008-02-05T18:30:30 = 6:30 WB 1995-12-22T09:05:02 = 9:05 WD -0010-09-15T04:44:23 = 4:44 WD Default 2008-02-05T18:30:30 = 6:30:30 WB 1995-12-22T09:05:02 = 9:05:02 WD -0010-09-15T04:44:23 = 4:44:23 WD Datetime Formats Full 2008-02-05T18:30:30 = Qibxata, Guraandhala 5, 2008 6:30:30 WB UTC 1995-12-22T09:05:02 = Jimaata, Muddee 22, 1995 9:05:02 WD UTC -0010-09-15T04:44:23 = Sanbata, Fuulbana 15, -10 4:44:23 WD UTC Long 2008-02-05T18:30:30 = 05 Guraandhala 2008 6:30:30 WB UTC 1995-12-22T09:05:02 = 22 Muddee 1995 9:05:02 WD UTC -0010-09-15T04:44:23 = 15 Fuulbana -10 4:44:23 WD UTC Medium 2008-02-05T18:30:30 = 05-Gur-2008 6:30:30 WB 1995-12-22T09:05:02 = 22-Mud-1995 9:05:02 WD -0010-09-15T04:44:23 = 15-Ful--10 4:44:23 WD Short 2008-02-05T18:30:30 = 05/02/08 6:30 WB 1995-12-22T09:05:02 = 22/12/95 9:05 WD -0010-09-15T04:44:23 = 15/09/-10 4:44 WD Default 2008-02-05T18:30:30 = 05-Gur-2008 6:30:30 WB 1995-12-22T09:05:02 = 22-Mud-1995 9:05:02 WD -0010-09-15T04:44:23 = 15-Ful--10 4:44:23 WD 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 Qib 1995-12-22T09:05:02 = 22 Jim -0010-09-15T04:44:23 = 15 San 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 WB 1995-12-22T09:05:02 = 9:05 WD -0010-09-15T04:44:23 = 4:44 WD 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 WB 1995-12-22T09:05:02 = 9:05:02 WD -0010-09-15T04:44:23 = 4:44:23 WD 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 = Qib, 2-5 1995-12-22T09:05:02 = Jim, 12-22 -0010-09-15T04:44:23 = San, 9-15 MMdd (dd/MM) 2008-02-05T18:30:30 = 05/02 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/09 MMM (LLL) 2008-02-05T18:30:30 = Gur 1995-12-22T09:05:02 = Mud -0010-09-15T04:44:23 = Ful MMMd (MMM d) 2008-02-05T18:30:30 = Gur 5 1995-12-22T09:05:02 = Mud 22 -0010-09-15T04:44:23 = Ful 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = Qib Gur 5 1995-12-22T09:05:02 = Jim Mud 22 -0010-09-15T04:44:23 = San Ful 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = Guraandhala 5 1995-12-22T09:05:02 = Muddee 22 -0010-09-15T04:44:23 = Fuulbana 15 MMMMdd (dd MMMM) 2008-02-05T18:30:30 = 05 Guraandhala 1995-12-22T09:05:02 = 22 Muddee -0010-09-15T04:44:23 = 15 Fuulbana MMMMEd (E MMMM d) 2008-02-05T18:30:30 = Qib Guraandhala 5 1995-12-22T09:05:02 = Jim Muddee 22 -0010-09-15T04:44:23 = San Fuulbana 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 (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = Qib, 2008-2-5 1995-12-22T09:05:02 = Jim, 1995-12-22 -0010-09-15T04:44:23 = San, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 Gur 1995-12-22T09:05:02 = 1995 Mud -0010-09-15T04:44:23 = -10 Ful yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = Qib, 2008 Gur 5 1995-12-22T09:05:02 = Jim, 1995 Mud 22 -0010-09-15T04:44:23 = San, -10 Ful 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 Guraandhala 1995-12-22T09:05:02 = 1995 Muddee -0010-09-15T04:44:23 = -10 Fuulbana yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 Q1 1995-12-22T09:05:02 = 1995 Q4 -0010-09-15T04:44:23 = -10 Q3 yyMM (MM/yy) 2008-02-05T18:30:30 = 02/08 1995-12-22T09:05:02 = 12/95 -0010-09-15T04:44:23 = 09/-10 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = Guraandhala 2008 1995-12-22T09:05:02 = Muddee 1995 -0010-09-15T04:44:23 = Fuulbana -10 Miscellaneous Prefers 24 hour time? No Local first day of the week Sanbata 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::om_ET(3)
All times are GMT -4. The time now is 09:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy