Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Count number of occurences of a word Post 302147900 by shikhakaul on Thursday 29th of November 2007 01:47:05 AM
Old 11-29-2007
Error This time with example

cpliterature_23289.esw3c_S.200710260000-2400-0:2007-10-25 23:56:52 72.30.216.103 GET /cpliterature.product.agilent.com/litweb/pdf/5989-4075ZHA.pdf 200 505286 72 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)" "-"
cpliterature_23289.esw3c_S.200710260000-2400-0:2007-10-25 23:57:14 74.6.28.142 GET /cpliterature.product.agilent.com/litweb/pdf/81130-91220.pdf 200 2888156 320 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)" "-"
cpliterature_23289.esw3c_S.200710260000-2400-0:2007-10-26 00:00:03 74.6.19.209 GET /cpliterature.product.agilent.com/litweb/pdf/5988-4969EN.pdf 200 1905042 156 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)" "-"


My file contains data like given above.....
I have to find number of times 200 appears in this file but only that 200 which comes after pdf
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

word count showing wrong number of lines

Hi , I am using SUN OS Version 5.6. I have a file that contains records of length 270. when I do 'set nu' in vi editor, I get the count as 86. whereas when I do "wc -l" on the command prompt, it shows the count as only 85. this is very strange. why would the 'wc' show 1 record less. The job... (3 Replies)
Discussion started by: tselvanin
3 Replies

2. UNIX for Dummies Questions & Answers

How to count the occurences of a specific word in a file in bash shell

Hello, I want to count the occurences of a specific word in a .txt file in bash shell. Can somebody help me pleaze?? Thanks!!! (2 Replies)
Discussion started by: mskart
2 Replies

3. Shell Programming and Scripting

How to count the number of occurences of this pattern?

Hi all, I have a pattern like this in a file: 123 4 56 789 234 5 67 789 121 3 56 789 222 4 65 789 321 6 90 100 478 8 40 789 243 7 80 789 How can I count the number of occurences of '789' (4th column) in this set...? Thanks for all your help! K (7 Replies)
Discussion started by: kripssmart
7 Replies

4. Shell Programming and Scripting

Count number of digits in a word

Hi all Can anybody suggest me, how to get the count of digits in a word I tried WORD=abcd1234 echo $WORD | grep -oE ] | wc -l 4 It works in bash command line, but not in scripts :mad: (12 Replies)
Discussion started by: ./hari.sh
12 Replies

5. 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

6. Shell Programming and Scripting

to count the number of occurences of a column value

im trying to count the number of occurences of column 2 value(starting from KKK*) of the below file, file.txt using the code cat file.txt | awk ' BEGIN { print "Category Counts"} {FS=","} {NR > 2} { cats = cats + 1} END { for(c in cats) { print c, "=", cats} } ' but its returning as ... (6 Replies)
Discussion started by: michaelrozar17
6 Replies

7. UNIX for Dummies Questions & Answers

Number of word occurences in a file?

Hello world, Can anybody tell me how to count how many times does a word repeat in a file? There have been many threads on this but they all are heavy loads of Scripting for a starter like me. :D So, I sat down today and after some hours of reading man pages, I found a simple one-line... (18 Replies)
Discussion started by: satish51392111
18 Replies

8. Shell Programming and Scripting

Count number of occurences using awk

Hi Guys, I have 2 files like below file1 xx yy file2 b yy b2 xx c1 yy xx yy Now I want an idea which can count occurences of text from file1 and file2 so outbout would be kind of (9 Replies)
Discussion started by: prashant2507198
9 Replies

9. Shell Programming and Scripting

Count and print the number of occurences

I have some files as shown below GLL ALM 654-656 654 656 SEM LYG 655-657 655 657 SEM LYG 655-657 655 657 ALM LEG 656-658 656 658 ALM LEG 656-658 656 658 ALM LEG 656-658 656 658 LEG LEG 658-660 658 660 LEG LEG 658-660 658 660 The value of GLL is... (5 Replies)
Discussion started by: arch
5 Replies

10. UNIX for Beginners Questions & Answers

Count occurences of the word without it repeating

Hi, I would like to count the number of ALA occurences without having them to be repeated. In the script I have written now it has 40 repetitions of ALA but it has to be 8. ALA is chosen as one of the 20 values it can have when the script asks for the input of AAA, which for this example is chosen... (7 Replies)
Discussion started by: Aurimas
7 Replies
Finance::Quote::Yahoo::Brasil(3)			User Contributed Perl Documentation			  Finance::Quote::Yahoo::Brasil(3)

NAME
Finance::Quote::Yahoo::Brasil - Fetch Brasiln stock quotes via Yahoo. SYNOPSIS
use Finance::Quote; my $q = Finance::Quote->new; my %info = $q->fetch("yahoo_brasil","BHP"); # Use this module only. my %info = $q->fetch("brasil","BHP"); # Failover with other methods. DESCRIPTION
This module allows information to be fetched from Yahoo abouts stocks traded on the Brasilian Stock Exchange. This module is loaded by default on a Finance::Quote object, although it can be explicitly loaded by passing the argument "Yahoo::Brasil" to Finance::Quote->new(). This module provides both the "brasil" and "yahoo_brasil" fetch methods. You should use the "brasil" method if you wish to allow failovers to other sources, and "yahoo_brasil" if you only want to obtain quotes from this module. Information obtained via this module is governed by Yahoo's terms and conditions, see http://br.finance.yahoo.com/ for more details. LABELS RETURNED
This module returns all the standard labels (where available) provided by Yahoo, as well as the currency label. See Finance::Quote::Yahoo::Base for more information. SEE ALSO
Yahoo Brasil, http://br.finance.yahoo.com/ Finance::Quote::Yahoo::Base perl v5.12.1 2009-10-05 Finance::Quote::Yahoo::Brasil(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