Sponsored Content
Top Forums UNIX for Dummies Questions & Answers count occurrences and substitute with counter Post 302168158 by ptob on Sunday 17th of February 2008 10:53:01 AM
Old 02-17-2008
Hi radoulov, thanks for the really quick reply. I just tried your suggestion, but it just gives
input: XXX bla XXX foo XXX
output: 1 bla 1 foo 1
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Search and Count Occurrences of Pattern in a File

I need to search and count the occurrences of a pattern in a file. The catch here is it's a pattern and not a word ( not necessarily delimited by spaces). For eg. if ABCD is the pattern I need to search and count, it can come in all flavors like (ABCD, ABCD), XYZ.ABCD=100, XYZ.ABCD>=500,... (6 Replies)
Discussion started by: tektips
6 Replies

2. Shell Programming and Scripting

Count the number of occurrences of the word

I am a newbie in UNIX shell script and seeking help on this UNIX function. Please give me a hand. Thanks. I have a large file. Named as 'MyFile'. It was tab-delmited. I am told to write a shell function that counts the number of occurrences of the ord “mysring” in the file 'MyFile'. (1 Reply)
Discussion started by: duke0001
1 Replies

3. Shell Programming and Scripting

Help with Unix and Awk to count number of occurrences

Hi, I have a file (movies.sh), this file contains list of movies such as I want to redirect the movies from movies.sh to file_to_process to allow me process the file with out losing anything. I have tried Movies.sh >> file_to_process But I want to add the row number to the data... (2 Replies)
Discussion started by: INHF
2 Replies

4. Shell Programming and Scripting

Count occurrences in awk

Hello, I have an output from GDB with many entries that looks like this 0x00007ffff7dece94 39 in dl-fini.c 0x00007ffff7dece97 39 in dl-fini.c 0x00007ffff7ab356c 50 in exit.c 0x00007ffff7aed9db in _IO_cleanup () at genops.c:1022 115 in dl-fini.c 0x00007ffff7decf7b in _dl_sort_fini (l=0x0,... (6 Replies)
Discussion started by: ikke008
6 Replies

5. Shell Programming and Scripting

Script to count word occurrences, but exclude some?

I am trying to count the occurrences of ALL words in a file. However, I want to exclude certain words: short words (i.e. <3 chars), and words contained in an blacklist file. There is also a desire to count words that are capitalized (e.g. proper names). I am not 100% sure where the line on... (5 Replies)
Discussion started by: Cronk
5 Replies

6. Shell Programming and Scripting

How to count occurrences in a specific column

Hi, I need help to count the number of occurrences in $3 of file1.txt. I only know how to count by checking one by one and the code is like this: awk '$3 ~ /aku hanya poyo/ {++c} END {print c}' FS="\t" file1.txt But this is not wise to do as i have hundreds of different occurrences in that... (10 Replies)
Discussion started by: redse171
10 Replies

7. Shell Programming and Scripting

awk Group By and count string occurrences

Hi Gurus, I'm scratching my head over and over and couldn't find the the right way to compose this AWK properly - PLEASE HELP :confused: Input: c,d,e,CLICK a,b,c,CLICK a,b,c,CONV c,d,e,CLICK a,b,c,CLICK a,b,c,CLICK a,b,c,CONV b,c,d,CLICK c,d,e,CLICK c,d,e,CLICK b,c,d,CONV... (6 Replies)
Discussion started by: Royi
6 Replies

8. Shell Programming and Scripting

Count occurrences in first column

input amex-11 10 abc amex-11 20 bcn amed-12 1 abc I tried something like this. awk '{h++}; END { for(k in h) print k, h }' rm1 output amex-11 1 10 abc amex-11 1 20 bcn amed-12 2 1 abc Note: The second column represents the occurrences. amex-11 is first one and amed-12 is the... (5 Replies)
Discussion started by: quincyjones
5 Replies

9. Shell Programming and Scripting

Count the number of string occurrences to display 0 entries in output

Hello Friends, Can somebody assist an issue I am having? I have a separate file with a list of account ids XXX200B02Y01 XXX200B03Y01 XXX200B05Y01 XXX200B07Y01 XXX200B08Y01 I call the file, and run an egrep against a directory and logfiles AccountID=$(cat... (2 Replies)
Discussion started by: liketheshell
2 Replies
DateTime::Locale::gez_ER(3)				User Contributed Perl Documentation			       DateTime::Locale::gez_ER(3)

NAME
DateTime::Locale::gez_ER SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'gez_ER' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Geez Eritrea. DATA
This locale inherits from the DateTime::Locale::gez locale. It contains the following data. Days Wide (format) XXX XXX XXX XXX XXX XXXX XXX Abbreviated (format) XXX XXX XXX XXX XXX XXX XXX Narrow (format) X X X X X X X Wide (stand-alone) XXX XXX XXX XXX XXX XXXX XXX Abbreviated (stand-alone) XXX XXX XXX XXX XXX XXX XXX Narrow (stand-alone) X X X X X X X Months Wide (format) XXX XXX XXX XXX XXXX XXX XXX XXX XXX XXX XXX XXX Abbreviated (format) XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX Narrow (format) X X X X X X X X X X X X Wide (stand-alone) XXX XXX XXX XXX XXXX XXX XXX XXX XXX XXX XXX XXX Abbreviated (stand-alone) XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX Narrow (stand-alone) X X X X X X X X X X X X 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 X/X X/X Narrow X/X X/X Date Formats Full 2008-02-05T18:30:30 = XXXX 05 XXX XXXX 2008 X/X 1995-12-22T09:05:02 = XXXX 22 XXX XXXX 1995 X/X -0010-09-15T04:44:23 = XXXXX 15 XXX XXXX -10 X/X Long 2008-02-05T18:30:30 = 05 XXX 2008 1995-12-22T09:05:02 = 22 XXX 1995 -0010-09-15T04:44:23 = 15 XXX -10 Medium 2008-02-05T18:30:30 = 05-XXX-2008 1995-12-22T09:05:02 = 22-XXX-1995 -0010-09-15T04:44:23 = 15-XXX--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-XXX-2008 1995-12-22T09:05:02 = 22-XXX-1995 -0010-09-15T04:44:23 = 15-XXX--10 Time Formats Full 2008-02-05T18:30:30 = 6:30:30 XXX UTC 1995-12-22T09:05:02 = 9:05:02 XXX UTC -0010-09-15T04:44:23 = 4:44:23 XXX UTC Long 2008-02-05T18:30:30 = 6:30:30 XXX UTC 1995-12-22T09:05:02 = 9:05:02 XXX UTC -0010-09-15T04:44:23 = 4:44:23 XXX UTC Medium 2008-02-05T18:30:30 = 6:30:30 XXX 1995-12-22T09:05:02 = 9:05:02 XXX -0010-09-15T04:44:23 = 4:44:23 XXX Short 2008-02-05T18:30:30 = 6:30 XXX 1995-12-22T09:05:02 = 9:05 XXX -0010-09-15T04:44:23 = 4:44 XXX Default 2008-02-05T18:30:30 = 6:30:30 XXX 1995-12-22T09:05:02 = 9:05:02 XXX -0010-09-15T04:44:23 = 4:44:23 XXX Datetime Formats Full 2008-02-05T18:30:30 = XXXX 05 XXX XXXX 2008 X/X 6:30:30 XXX UTC 1995-12-22T09:05:02 = XXXX 22 XXX XXXX 1995 X/X 9:05:02 XXX UTC -0010-09-15T04:44:23 = XXXXX 15 XXX XXXX -10 X/X 4:44:23 XXX UTC Long 2008-02-05T18:30:30 = 05 XXX 2008 6:30:30 XXX UTC 1995-12-22T09:05:02 = 22 XXX 1995 9:05:02 XXX UTC -0010-09-15T04:44:23 = 15 XXX -10 4:44:23 XXX UTC Medium 2008-02-05T18:30:30 = 05-XXX-2008 6:30:30 XXX 1995-12-22T09:05:02 = 22-XXX-1995 9:05:02 XXX -0010-09-15T04:44:23 = 15-XXX--10 4:44:23 XXX Short 2008-02-05T18:30:30 = 05/02/08 6:30 XXX 1995-12-22T09:05:02 = 22/12/95 9:05 XXX -0010-09-15T04:44:23 = 15/09/-10 4:44 XXX Default 2008-02-05T18:30:30 = 05-XXX-2008 6:30:30 XXX 1995-12-22T09:05:02 = 22-XXX-1995 9:05:02 XXX -0010-09-15T04:44:23 = 15-XXX--10 4:44:23 XXX 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 XXX 1995-12-22T09:05:02 = 22 XXX -0010-09-15T04:44:23 = 15 XXX 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 XXX 1995-12-22T09:05:02 = 9:05 XXX -0010-09-15T04:44:23 = 4:44 XXX 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 XXX 1995-12-22T09:05:02 = 9:05:02 XXX -0010-09-15T04:44:23 = 4:44:23 XXX 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 = XXX, 2-5 1995-12-22T09:05:02 = XXX, 12-22 -0010-09-15T04:44:23 = XXX, 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 = XXX 1995-12-22T09:05:02 = XXX -0010-09-15T04:44:23 = XXX MMMd (MMM d) 2008-02-05T18:30:30 = XXX 5 1995-12-22T09:05:02 = XXX 22 -0010-09-15T04:44:23 = XXX 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = XXX XXX 5 1995-12-22T09:05:02 = XXX XXX 22 -0010-09-15T04:44:23 = XXX XXX 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = XXX 5 1995-12-22T09:05:02 = XXX 22 -0010-09-15T04:44:23 = XXX 15 MMMMdd (dd MMMM) 2008-02-05T18:30:30 = 05 XXX 1995-12-22T09:05:02 = 22 XXX -0010-09-15T04:44:23 = 15 XXX MMMMEd (E MMMM d) 2008-02-05T18:30:30 = XXX XXX 5 1995-12-22T09:05:02 = XXX XXX 22 -0010-09-15T04:44:23 = XXX XXX 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 = XXX, 2008-2-5 1995-12-22T09:05:02 = XXX, 1995-12-22 -0010-09-15T04:44:23 = XXX, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 XXX 1995-12-22T09:05:02 = 1995 XXX -0010-09-15T04:44:23 = -10 XXX yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = XXX, 2008 XXX 5 1995-12-22T09:05:02 = XXX, 1995 XXX 22 -0010-09-15T04:44:23 = XXX, -10 XXX 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 XXX 1995-12-22T09:05:02 = 1995 XXX -0010-09-15T04:44:23 = -10 XXX 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 = XXX 2008 1995-12-22T09:05:02 = XXX 1995 -0010-09-15T04:44:23 = XXX -10 Miscellaneous Prefers 24 hour time? No Local first day of the week XXXX 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::gez_ER(3)
All times are GMT -4. The time now is 02:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy