Sponsored Content
Top Forums Shell Programming and Scripting How to identify the occurence of a pattern between a unique character? Post 302378899 by divak on Wednesday 9th of December 2009 04:44:49 AM
Old 12-09-2009
Hammer & Screwdriver How to identify the occurence of a pattern between a unique character?

hi,

is it possible to find the number of occurences of a pattern between two paranthesis.

for e.g

i have a file as below.

Code:
>>{
>>hi 
>>GoodMorning
>>how are you?
>>}
>>is it good, 
>>tell me yes, if it is good

In the above file, its clear the occurence of word "Good" is thrice.

But i need the output of only the count of occurence that exist between the { }, which is one here.

How could i do this??

Thanks

Last edited by zaxxon; 12-09-2009 at 06:03 AM.. Reason: code tags please
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

First occurence of character in a file

Hi All I have the following contents in a file say in a file name called 'FILE1' *********** Start of the file ************** SANDIO000456GROJ8900 SANDIO2338923GRJH900 *********** End of the file ******************* I want to cut the first line which has the characters.... (6 Replies)
Discussion started by: dhanamurthy
6 Replies

2. UNIX for Dummies Questions & Answers

Counting occurence of a particular character on each line

Hi, I have the following data in a flat file: abcd_efgh_ijkl_20080522.dat|20080602222508|1357 abcd_efgh_ijkl_20080522.dat|20080602222508|1357 abcd_efgh_ijkl_20080522.dat|20080602222508|1357 I need to check the no. of occurence of "|" (pipe) on each line and the output should look like below:... (4 Replies)
Discussion started by: hey_mak
4 Replies

3. UNIX for Advanced & Expert Users

How to count the occurence of a character in a line

Suppose i have data like :- 1,2,3,4,5 a,b,c x,y,z,t I want to count the occurence of , (comma) in every line. Waiting for a solution.:) (1 Reply)
Discussion started by: sumit207
1 Replies

4. UNIX for Dummies Questions & Answers

How to count the occurence of a character in a line

Suppose i have data like :- 1,2,3,4,5 a,b,c x,y,z,t I want to count the occurence of , (comma) in every line. Waiting for a solution. (5 Replies)
Discussion started by: sumit207
5 Replies

5. UNIX for Dummies Questions & Answers

How to search unique occurence in a file?

Hi, I have to search and count unique occurence of DE numbers in bold below in a file which has content like below. Proc Tran F-BUY Item Tkey Q5JV Item Tsid JTIZ9 Item Tdat 20091001 Item Tset 20091001 Item Tbkr 5 Item Tshs 2 Item Tprc 897.0 Item Tcom 2000.0 Item Tcm1 20091001... (6 Replies)
Discussion started by: akash028
6 Replies

6. Shell Programming and Scripting

Identify file pattern, take count of pattern, then act

Guys - Need your ideas on a section of code to finish something up. To make a long story short, I'm parsing a print output file that goes to pre-printed forms. I'm intercepting it, parsing it, formatting it, cutting it up into individual pages, grabbing the text I want in zones, building an... (3 Replies)
Discussion started by: ampsys
3 Replies

7. Shell Programming and Scripting

Regex to identify unique words in a dictionary database

Hello, I have a dictionary which I am building for the Open Source Community. The data structure is as under HEADWORD=PARTOFSPEECH=ENGLISH MEANING as shown in the example below अ=m=Prefix signifying negation. अँहँ=ind=Interjection expressing disapprobation. अं=int=An interjection... (2 Replies)
Discussion started by: gimley
2 Replies

8. Shell Programming and Scripting

How to identify varying unique fields values from a text file in UNIX?

Hi, I have a huge unsorted text file. We wanted to identify the unique field values in a line and consider those fields as a primary key for a table in upstream system. Basically, the process or script should fetch the values from each line that are unique compared to the rest of the lines in... (13 Replies)
Discussion started by: manikandan23
13 Replies

9. UNIX for Beginners Questions & Answers

Awk: count unique elements in a field and sum their occurence across the entire file

Hi, Sure it's an easy one, but it drives me insane. input ("|" separated): 1|A,B,C,A 2|A,D,D 3|A,B,B I would like to count the occurence of each capital letters in $2 across the entire file, knowing that duplicates in each record count as 1. I am trying to get this output... (5 Replies)
Discussion started by: beca123456
5 Replies

10. Shell Programming and Scripting

Extract whole word preceding a specific character pattern with first occurence of the pattern

Hello. Here is a file contents : declare -Ax NEW_FORCE_IGNORE_ARRAY=(="§" ="§" ="§" ="§" ="§" .................. ="§"Here is a pattern =I want to extract 'NEW_FORCE_IGNORE_ARRAY' which is the whole word before the first occurrence of pattern '=' Is there a better solution than mine :... (3 Replies)
Discussion started by: jcdole
3 Replies
Date::Manip::Lang::russian(3)				User Contributed Perl Documentation			     Date::Manip::Lang::russian(3)

NAME
Date::Manip::Lang::russian - Russian language support. SYNOPSIS
This module contains a list of words and expressions supporting the language. It is not intended to be used directly (other Date::Manip modules will load it as needed). LANGUAGE EXPRESSIONS
The following is a list of all language words and expressions used to write times and/or dates. All strings are case insensitive. Month names and abbreviations When writing out the name of the month, several different variations may exist including full names and abbreviations. The following month names may be used: XXXXXX XXXXXX XXXXXXX XXXXXXX XXXXX XXXX XXXXXX XXXXXX XXX XXX XXXX XXXX XXXX XXXX XXXXXXX XXXXXX XXXXXXXX XXXXXXXX XXXXXXX XXXXXXX XXXXXX XXXXXX XXXXXXX XXXXXXX The following abbreviations may be used: XXX XXX. XXX XXX XXXX. XXX XXXXX XXXX XXX XXX. XXX XXX XXX XXXX XXXX XXX XXXX XXXX XXX XXX. XXX XXX XXXX. XXX XXX. XXXX XXX XXXX. XXX XXX. Day names and abbreviations When writing out the name of the day, several different variations may exist including full names and abbreviations. The following day names may be used: XXXXXXXXXXX XXXXXXX XXXXX XXXXXXX XXXXXXX XXXXXXX XXXXXXXXXXX The following abbreviations may be used: XXX XX XXX XXX XX XXX XXX XX XXe XXX XX XXX XXX XX XXX XXX XX XXX XXX XX XXXX The following short (1-2 characters) abbreviations may be used: XX XX XX XX XX XX XX Delta field names These are the names (and abbreviations) for the fields in a delta. There are 7 fields: years, months, weeks, days, hours, minutes, seconds. The names and abbreviations for these fields are: X XX XXX XXX XXX XXXX XXX XXXXX XXXXXXX XXXXXX XXXXXX XXXXXX XXXXXX X XXXX XXXX XXX X X. XX XXX XXX XXXXX XXXX XX XXX XXXXXX XXXXX X XXX XXXXXXX XXXXXX Morning/afternoon times This is a list of expressions use to designate morning or afternoon time when a time is entered as a 12-hour time rather than a 24-hour time. For example, in English, the time "17:00" could be specified as "5:00 PM". Morning and afternoon time may be designated by the following sets of words: XX XX X.X. XXXX XXXX XX XXXXXXX XX XX X.X. XXX XXXXXX XXXXX XXXXXXX XX XXXXXXX Each or every There are a list of words that specify every occurence of something. These are used in the following phrases: EACH Monday EVERY Monday EVERY month The following words may be used: XXXXXX Next/Previous/Last occurence There are a list of words that may be used to specify the next, previous, or last occurence of something. These words could be used in the following phrases: NEXT week LAST tuesday PREVIOUS tuesday LAST day of the month The following words may be used: Next occurence: XXXXXXXXX Previous occurence: XXXXXXXXXX Last occurence: XXXXXXXXX Delta words for going forward/backward in time When parsing deltas, there are words that may be used to specify the the delta will refer to a time in the future or to a time in the past (relative to some date). In English, for example, you might say: IN 5 days 5 days AGO The following words may be used to specify deltas that refer to dates in the past or future respectively: XXXXX XX XXXXXX XX XXXXX Business mode This contains two lists of words which can be used to specify a standard (i.e. non-business) delta or a business delta. Previously, it was used to tell whether the delta was approximate or exact, but now this list is not used except to force the delta to be standard. The following words may be used: XXXXX XXXXXXXX The following words may be used to specify a business delta: XXXXXXX Numbers Numbers may be spelled out in a variety of ways. The following sets correspond to the numbers from 1 to 53: 1 XXXXXX XXXXXXX XXXXXX XXXX 2 XXXXXX XXXXXXX XXXXXX XXX 3 XXXXXX XXXXXXXX XXXXXX XXX 4 XXXXXXXXX XXXXXXXXXX XXXXXXXXX XXXXXX 5 XXXXX XXXXXX XXXXX XXXX 6 XXXXXX XXXXXXX XXXXXX XXXXX 7 XXXXXXX XXXXXXXX XXXXXXX XXXX 8 XXXXXXX XXXXXXXX XXXXXXX XXXXXX 9 XXXXXXX XXXXXXXX XXXXXXX XXXXXX 10 XXXXXXX XXXXXXXX XXXXXXX XXXXXX 11 XXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXX 12 XXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXX 13 XXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXX 14 XXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX 15 XXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXX 16 XXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXX 17 XXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXX 18 XXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXX 19 XXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX 20 XXXXXXXXX XXXXXXXXXX XXXXXXXXX XXXXXXXX 21 XXXXXXXX XXXXXX XXXXXXXX XXXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX 22 XXXXXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXX 23 XXXXXXXX XXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXXXX XXX 24 XXXXXXXX XXXXXXXXX XXXXXXXX XXXXXXXXXX XXXXXXXX XXXXXXXXX XXXXXXXX XXXXXX 25 XXXXXXXX XXXXX XXXXXXXX XXXXXX XXXXXXXX XXXXX XXXXXXXX XXXX 26 XXXXXXXX XXXXXX XXXXXXXX XXXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXXX 27 XXXXXXXX XXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXX XXXXXXXX XXXX 28 XXXXXXXX XXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXX XXXXXXXX XXXXXX 29 XXXXXXXX XXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXX XXXXXXXX XXXXXX 30 XXXXXXXXX XXXXXXXXXX XXXXXXXXX XXXXXXXX 31 XXXXXXXX XXXXXX XXXXXXXX XXXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX 32 XXXXXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXX 33 XXXXXXXX XXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXXXX XXX 34 XXXXXXXX XXXXXXXXX XXXXXXXX XXXXXXXXXX XXXXXXXX XXXXXXXXX XXXXXXXX XXXXXX 35 XXXXXXXX XXXXX XXXXXXXX XXXXXX XXXXXXXX XXXXX XXXXXXXX XXXX 36 XXXXXXXX XXXXXX XXXXXXXX XXXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXXX 37 XXXXXXXX XXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXX XXXXXXXX XXXX 38 XXXXXXXX XXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXX XXXXXXXX XXXXXX 39 XXXXXXXX XXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXX XXXXXXXX XXXXXX 40 XXXXXXXXX XXXXX 41 XXXXX XXXXXX XXXXX XXXXXXX XXXXX XXXXXX XXXXX XXXX 42 XXXXX XXXXXX XXXXX XXXXXX XXXXX XXXXXX XXXXX XXX 43 XXXXX XXXXXX XXXXX XXXXXXXX XXXXX XXXXXX XXXXX XXX 44 XXXXX XXXXXXXXX XXXXX XXXXXXXXXX XXXXX XXXXXXXXX XXXXX XXXXXX 45 XXXXX XXXXX XXXXX XXXXXX XXXXX XXXXX XXXXX XXXX 46 XXXXX XXXXXX XXXXX XXXXXXX XXXXX XXXXXX XXXXX XXXXX 47 XXXXX XXXXXXX XXXXX XXXXXXXX XXXXX XXXXXXX XXXXX XXXX 48 XXXXX XXXXXXX XXXXX XXXXXXXX XXXXX XXXXXXX XXXXX XXXXXX 49 XXXXX XXXXXXX XXXXX XXXXXXXX XXXXX XXXXXXX XXXXX XXXXXX 50 XXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXX 51 XXXXXXXXX XXXXXX XXXXXXXXX XXXXXXX XXXXXXXXX XXXXXX XXXXXXXXX XXXX 52 XXXXXXXXX XXXXXX XXXXXXXXX XXXXXX XXXXXXXXX XXXXXX XXXXXXXXX XXX 53 XXXXXXXXX XXXXXX XXXXXXXXX XXXXXXXX XXXXXXXXX XXXXXX XXXXXXXXX XXX Ignored words In writing out dates in common forms, there are a number of words that are typically not important. There is frequently a word that appears in a phrase to designate that a time is going to be specified next. In English, you would use the word AT in the example: December 3 at 12:00 The following words may be used: X Another word is used to designate one member of a set. In English, you would use the words IN or OF: 1st day OF December 1st day IN December The following words may be used: Not defined in this language Another word is use to specify that something is on a certain date. In English, you would use ON: ON July 5th The following words may be used: X Words that set the date, time, or both There are some words that can be used to specify a date, a time, or both relative to now. Words that set the date are similar to the English words 'yesterday' or 'tomorrow'. These are specified as a delta which is added to the current time to get a date. The time is NOT set however, so the delta is only partially used (it should only include year, month, week, and day fields). The following words may be used: XXXXX -0:0:0:1:0:0:0 XXXXXX +0:0:0:1:0:0:0 XXXXXXXXX -0:0:0:2:0:0:0 XXXXXXXXXXX +0:0:0:2:0:0:0 XXXXXXX 0:0:0:0:0:0:0 Words that set only the time of day are similar to the English words 'noon' or 'midnight'. The following words may be used: XXXXXXX 12:00:00 XXXXXXX 00:00:00 Words that set the entire time and date (relative to the current time and date) are also available. In English, the word 'now' is one of these. The following words may be used: XXXXXX 0:0:0:0:0:0:0 Hour/Minute/Second separators When specifying the time of day, the most common separator is a colon (:) which can be used for both separators. Some languages use different pairs. For example, French allows you to specify the time as 13h30:20, so it would use the following pairs: : : [h] [:] The first column is the hour-minute separator and the second column is the minute-second separator. Both are perl regular expressions. A pair of colons is ALWAY allowed for all languages. If a language allows additional pairs, they are listed here: [X] [X] KNOWN BUGS
None known. BUGS AND QUESTIONS
Please refer to the Date::Manip::Problems documentation for information on submitting bug reports or questions to the author. SEE ALSO
Date::Manip - main module documentation LICENSE
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHOR
Sullivan Beck (sbeck@cpan.org) perl v5.16.3 2014-06-09 Date::Manip::Lang::russian(3)
All times are GMT -4. The time now is 02:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy