Sponsored Content
Top Forums UNIX for Dummies Questions & Answers [Solved] Count amount of times of appearing of character before a word? Post 302630549 by itkamaraj on Thursday 26th of April 2012 01:28:19 AM
Old 04-26-2012
echo "Desktop/Myfiles/pet/dog/puppy" | awk -F\/ '{for(i=1;i<=NF;i++){if($i~/dog/)print i-1}}'
This User Gave Thanks to itkamaraj For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed X amount of times - X is dynamic

I'm trying to make a bash shell script that will allow a user to modify another file based on input they give. Maybe someone can see what I'm doing wrong here. I'm still pretty new at this... Let's say my temp file contains this: 0 1 HELLO 3 4 And here's the code: old=(0 1 3 4) new=(zero... (2 Replies)
Discussion started by: Loriel
2 Replies

2. UNIX for Dummies Questions & Answers

count amount of accounts?

Hi, I am relatively new to Unix and trying to understand as much as I can. I would like to know if it's possible to count the total number of Unix accounts? If so, can the count be done from any working directory or does it have to be specific to where the accounts are based? Thanks! (4 Replies)
Discussion started by: Trogan
4 Replies

3. Shell Programming and Scripting

Looking for a single line to count how many times one character occurs in a word...

I've been looking on the internet, and haven't found anything simple enough to use in my code. All I want to do is count how many times "-" occurs in a string of characters (as a package name). It seems it should be very simple, and shouldn't require more than one line to accomplish. And this is... (2 Replies)
Discussion started by: Shingoshi
2 Replies

4. Shell Programming and Scripting

scripting - write a script that will count the number of times a particular word

hello everyone, I'm trying to learn some scripts but i cant get my head around two of them. 1. how can i write a script that will count the number of times a particular word is used in file? 2. how can i make a script that will take me to a web page from unix? if anyone could help it... (3 Replies)
Discussion started by: BigTool4u2
3 Replies

5. Shell Programming and Scripting

How to format a character to look like an amount -solved

Hi All, I want to format the retrieved varchar2 value in the database to $9,999,999,990.00 but remained as a character value. Is it possible? Example: 378273.23 to $378,273.23 below is the code i want to implement: sqlplus -s ${USERNAME}/${PASSWORD}@${ORACLE_SID} << END1 >> $LOGFILE... (0 Replies)
Discussion started by: ryukishin_17
0 Replies

6. UNIX for Advanced & Expert Users

Count specific word or character per line

Hi, I need help regarding counting specific word or character per line and validate it against a specific number i.e 10. And if number of character equals the specific number then that line will be part of the output. Specific number = 6 Specific word or char = || Sample data:... (1 Reply)
Discussion started by: janzper
1 Replies

7. UNIX for Dummies Questions & Answers

how to count number of times each word exist in a file

I'm trying to count the number of times each word in the file exist for example if the file has: today I have a lot to write, but I will not go for it. The main thing is that today I am looking for a way to get each word in this file with a word count after it specifying that this word has... (4 Replies)
Discussion started by: shnkool
4 Replies

8. UNIX for Dummies Questions & Answers

How do I count how many times a specific word appear in a file (ksh)?

Hi Please can you help how do I count the number of specific characters or words that appear in a file? (8 Replies)
Discussion started by: fretagi
8 Replies

9. Shell Programming and Scripting

Count same word which has come many times in single lines & pars

can i get a simple script for , Count same word which has come many times in single lines & pars Eg file would be == "Thanks heman thanks thanks Thanks heman thanks man" So resullt should be Thanks = 5 heman=2 man = 1 thanks in advance :) Please use code tags for code and... (1 Reply)
Discussion started by: heman96
1 Replies

10. UNIX for Dummies Questions & Answers

[Solved] Awk: count occurrence of each character for every field

Hi, let's say an input looks like: A|C|C|D A|C|I|E A|B|I|C A|T|I|B as the title of the thread explains, I am trying to get something like: 1|A=4 2|C=2|B=1|T=1 3|I=3|C=1 4|D=1|E=1|C=1|B=1 i.e. a count of every character in each field (first column of output) independently, sorted... (4 Replies)
Discussion started by: beca123456
4 Replies
DateTime::Locale::hr(3) 				User Contributed Perl Documentation				   DateTime::Locale::hr(3)

NAME
DateTime::Locale::hr SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'hr' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Croatian. DATA
This locale inherits from the DateTime::Locale::root locale. It contains the following data. Days Wide (format) ponedjeljak utorak srijeda Xetvrtak petak subota nedjelja Abbreviated (format) pon uto sri Xet pet sub ned Narrow (format) p u s X p s n Wide (stand-alone) ponedjeljak utorak srijeda Xetvrtak petak subota nedjelja Abbreviated (stand-alone) pon uto sri Xet pet sub ned Narrow (stand-alone) p u s X p s n Months Wide (format) sijeXnja veljaXe oXujka travnja svibnja lipnja srpnja kolovoza rujna listopada studenoga prosinca Abbreviated (format) 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 11. 12. Narrow (format) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Wide (stand-alone) sijeXanj veljaXa oXujak travanj svibanj lipanj srpanj kolovoz rujan listopad studeni prosinac Abbreviated (stand-alone) 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 11. 12. Narrow (stand-alone) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Quarters Wide (format) 1. kvartal 2. kvartal 3. kvartal 4. kvartal Abbreviated (format) 1kv 2kv 3kv 4kv Narrow (format) 1 2 3 4 Wide (stand-alone) 1. kvartal 2. kvartal 3. kvartal 4. kvartal Abbreviated (stand-alone) 1kv 2kv 3kv 4kv Narrow (stand-alone) 1 2 3 4 Eras Wide Prije Krista Poslije Krista Abbreviated pr.n.e. AD Narrow pr.n.e. AD Date Formats Full 2008-02-05T18:30:30 = utorak, 5. veljaXe 2008. 1995-12-22T09:05:02 = petak, 22. prosinca 1995. -0010-09-15T04:44:23 = subota, 15. rujna -10. Long 2008-02-05T18:30:30 = 5. veljaXe 2008. 1995-12-22T09:05:02 = 22. prosinca 1995. -0010-09-15T04:44:23 = 15. rujna -10. Medium 2008-02-05T18:30:30 = 5.2.2008. 1995-12-22T09:05:02 = 22.12.1995. -0010-09-15T04:44:23 = 15.9.-010. Short 2008-02-05T18:30:30 = 05.02.2008. 1995-12-22T09:05:02 = 22.12.1995. -0010-09-15T04:44:23 = 15.09.-010. Default 2008-02-05T18:30:30 = 5.2.2008. 1995-12-22T09:05:02 = 22.12.1995. -0010-09-15T04:44:23 = 15.9.-010. Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = utorak, 5. veljaXe 2008. 18:30:30 UTC 1995-12-22T09:05:02 = petak, 22. prosinca 1995. 09:05:02 UTC -0010-09-15T04:44:23 = subota, 15. rujna -10. 04:44:23 UTC Long 2008-02-05T18:30:30 = 5. veljaXe 2008. 18:30:30 UTC 1995-12-22T09:05:02 = 22. prosinca 1995. 09:05:02 UTC -0010-09-15T04:44:23 = 15. rujna -10. 04:44:23 UTC Medium 2008-02-05T18:30:30 = 5.2.2008. 18:30:30 1995-12-22T09:05:02 = 22.12.1995. 09:05:02 -0010-09-15T04:44:23 = 15.9.-010. 04:44:23 Short 2008-02-05T18:30:30 = 05.02.2008. 18:30 1995-12-22T09:05:02 = 22.12.1995. 09:05 -0010-09-15T04:44:23 = 15.09.-010. 04:44 Default 2008-02-05T18:30:30 = 5.2.2008. 18:30:30 1995-12-22T09:05:02 = 22.12.1995. 09:05:02 -0010-09-15T04:44:23 = 15.9.-010. 04:44:23 Available Formats d (d.) 2008-02-05T18:30:30 = 5. 1995-12-22T09:05:02 = 22. -0010-09-15T04:44:23 = 15. EEEd (EEE, d.) 2008-02-05T18:30:30 = uto, 5. 1995-12-22T09:05:02 = pet, 22. -0010-09-15T04:44:23 = sub, 15. HHmm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 hhmm (hh:mm a) 2008-02-05T18:30:30 = 06:30 PM 1995-12-22T09:05:02 = 09:05 AM -0010-09-15T04:44:23 = 04:44 AM HHmmss (HH:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 hhmmss (hh:mm:ss a) 2008-02-05T18:30:30 = 06:30:30 PM 1995-12-22T09:05:02 = 09:05:02 AM -0010-09-15T04:44:23 = 04:44:23 AM 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 (d.M.) 2008-02-05T18:30:30 = 5.2. 1995-12-22T09:05:02 = 22.12. -0010-09-15T04:44:23 = 15.9. MEd (E, d.M.) 2008-02-05T18:30:30 = uto, 5.2. 1995-12-22T09:05:02 = pet, 22.12. -0010-09-15T04:44:23 = sub, 15.9. 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 = 02.. 1995-12-22T09:05:02 = 12.. -0010-09-15T04:44:23 = 09.. MMMd (d.MMM.) 2008-02-05T18:30:30 = 5.02.. 1995-12-22T09:05:02 = 22.12.. -0010-09-15T04:44:23 = 15.09.. MMMEd (E, d.MMM.) 2008-02-05T18:30:30 = uto, 5.02.. 1995-12-22T09:05:02 = pet, 22.12.. -0010-09-15T04:44:23 = sub, 15.09.. MMMMd (d. MMMM) 2008-02-05T18:30:30 = 5. veljaXe 1995-12-22T09:05:02 = 22. prosinca -0010-09-15T04:44:23 = 15. rujna MMMMdd (dd. MMMM) 2008-02-05T18:30:30 = 05. veljaXe 1995-12-22T09:05:02 = 22. prosinca -0010-09-15T04:44:23 = 15. rujna MMMMEd (E, d. MMMM) 2008-02-05T18:30:30 = uto, 5. veljaXe 1995-12-22T09:05:02 = pet, 22. prosinca -0010-09-15T04:44:23 = sub, 15. rujna 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, d.M.y.) 2008-02-05T18:30:30 = uto, 5.2.2008. 1995-12-22T09:05:02 = pet, 22.12.1995. -0010-09-15T04:44:23 = sub, 15.9.-10. yMMM (MMM.y.) 2008-02-05T18:30:30 = 02..2008. 1995-12-22T09:05:02 = 12..1995. -0010-09-15T04:44:23 = 09..-10. yMMMEd (EEE, d.MMM.y.) 2008-02-05T18:30:30 = uto, 5.02..2008. 1995-12-22T09:05:02 = pet, 22.12..1995. -0010-09-15T04:44:23 = sub, 15.09..-10. yMMMM (MMMM y.) 2008-02-05T18:30:30 = veljaXe 2008. 1995-12-22T09:05:02 = prosinca 1995. -0010-09-15T04:44:23 = rujna -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 = 1kv 2008. 1995-12-22T09:05:02 = 4kv 1995. -0010-09-15T04:44:23 = 3kv -10. yyMMMEEEd (EEE, d.MMM.yy.) 2008-02-05T18:30:30 = uto, 5.02..08. 1995-12-22T09:05:02 = pet, 22.12..95. -0010-09-15T04:44:23 = sub, 15.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. yyQQQQ (QQQQ yy.) 2008-02-05T18:30:30 = 1. kvartal 08. 1995-12-22T09:05:02 = 4. kvartal 95. -0010-09-15T04:44:23 = 3. kvartal -10. yyyyMM (MM.yyyy.) 2008-02-05T18:30:30 = 02.2008. 1995-12-22T09:05:02 = 12.1995. -0010-09-15T04:44:23 = 09.-010. yyyyMMMM (MMMM y.) 2008-02-05T18:30:30 = veljaXe 2008. 1995-12-22T09:05:02 = prosinca 1995. -0010-09-15T04:44:23 = rujna -10. Miscellaneous Prefers 24 hour time? Yes Local first day of the week ponedjeljak 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.2 2013-08-25 DateTime::Locale::hr(3)
All times are GMT -4. The time now is 03:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy