Sponsored Content
Top Forums Shell Programming and Scripting SED Question: Search and Replace start of line to matching pattern Post 302405044 by DrivesMeCrazy on Thursday 18th of March 2010 12:18:57 AM
Old 03-18-2010
Thanks alot Jim.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SED Search Pattern and Replace with the Pattern

Hello All, I have a string "CP_STATUS OSSRC_R6_0_Shipment_R1H_CU AOM_901046 R1H_LLSV1_2008031", and I just want to extract LLSV1, but I dont get the expected result when using the sed command below. # echo "CP_STATUS OSSRC_R6_0_Shipment_R1H_CU AOM_901046 R1H_LLSV1_2008031" | awk '{print... (4 Replies)
Discussion started by: racbern
4 Replies

2. Shell Programming and Scripting

sed: Find start of pattern and extract text to end of line, including the pattern

This is my first post, please be nice. I have tried to google and read different tutorials. The task at hand is: Input file input.txt (example) abc123defhij-E-1234jslo 456ujs-W-abXjklp From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Discussion started by: TestTomas
5 Replies

3. Shell Programming and Scripting

search a pattern and replace the whole line

Hi All, I have a requirement where I have to find a pattern in a file and comment the whole line containing the search pattern. Any ideas in shell is welcome. Thanks in advance, Regards, Arun (3 Replies)
Discussion started by: arun_maffy
3 Replies

4. Shell Programming and Scripting

sed pattern matching question

I inherited a script that contains the following sed command: sed -n -e '/^.*ABCD|/p' $fileName | sed -e 's/^.*ABCD|//' | sed -e 's/|ABCD$//' > ${fileName}.tmp What I'm wondering is whether ABCD has a special pattern matching value in sed, such as a character class similar or identical to . ... (9 Replies)
Discussion started by: topmhat
9 Replies

5. Shell Programming and Scripting

How to use sed to modify a line above or below matching pattern?

I couldn't figure out how to use sed or any other shell to do the following. Can anyone help? Thanks. If seeing a string (e.g., TODAY) in the line, replace a string in the line above (e.g, replace "Raining" with "Sunny") and replace a string in the line below (e.g., replace "Reading" with... (7 Replies)
Discussion started by: sprinner
7 Replies

6. Shell Programming and Scripting

sed to replace the matching pattern with equal number of spaces

Hi I have written a shell script which used sed code below sed -i 's/'"$Pattern"'/ /g' $FileName I want to count the length of Pattern and replace it with equal number of spaces in the FileName. I have used $(#pattern) to get the length but could not understand how to replace... (8 Replies)
Discussion started by: rakeshkumar
8 Replies

7. UNIX for Dummies Questions & Answers

Sed: Adding new line after matching pattern

Hi I just wanted to add a new line after every matching pattern: The method doing this doesn't matter, however, I have been using sed and this is what I tried doing, knowing that I am a bit off: sed 'Wf a\'/n'/g' Basically, I want to add a new line after occurrence of Wf. After the line Wf... (5 Replies)
Discussion started by: MIA651
5 Replies

8. Shell Programming and Scripting

Sed: printing lines AFTER pattern matching EXCLUDING the line containing the pattern

'Hi I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match. Which option is to be used to exclude the line containing the pattern? sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies

9. Shell Programming and Scripting

sed - Search and replace within pattern

Hi Guys! Unix newbie here! Have a requirement for which I have been scouting the forums for a solution but has been out of luck so far :( I have a file which contains the following:- TEST1|TEST2|"TEST3|1@!2"|TEST5 My sed command should result in either one the following output:-... (6 Replies)
Discussion started by: hishamzz
6 Replies

10. Shell Programming and Scripting

sed - Exact pattern matching and replace

Hi Team, I am facing a problem as under, Suppose I have a file (test.txt) with the below content (all braces and slashes are included in the contents of the file) Now I want to append few words below matched line, I have written the below sed: sed '/option/a insert text here' test... (2 Replies)
Discussion started by: ankur328
2 Replies
DateTime::Locale::om(3) 				User Contributed Perl Documentation				   DateTime::Locale::om(3)

NAME
DateTime::Locale::om SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'om' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Oromo. DATA
This locale inherits from the DateTime::Locale::root 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 Wiixata 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.16.3 2014-06-10 DateTime::Locale::om(3)
All times are GMT -4. The time now is 07:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy