Sponsored Content
Full Discussion: Counting words
Top Forums Shell Programming and Scripting Counting words Post 302368201 by kinny on Wednesday 4th of November 2009 10:03:17 AM
Old 11-04-2009
I need the grand total as well
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Counting words in a file

I'm trying to figure out a way to count the number of words in the follwing file: cal 2002 > file1 Is there anyway to do this without using wc but instead using the cut command? (1 Reply)
Discussion started by: r0mulus
1 Replies

2. UNIX for Dummies Questions & Answers

counting words then amending to a file

i want to count the number of words in a file and then redirect this to a file echo 'total number of words=' wc -users>file THis isnt working, anyone any ideas. (1 Reply)
Discussion started by: iago
1 Replies

3. Programming

Counting characters, words, spaces, punctuations, etc.

I am very new to C programming. How could I write a C program that could count the characters, words, spaces, and punctuations in a text file? Any help will be really appreciated. I am doing this as part of my C learning exercise. Thanks, Ajay (4 Replies)
Discussion started by: ajay41aj
4 Replies

4. UNIX for Dummies Questions & Answers

counting words

if i have a long list of data, with every line beginning with an ip-address, like this: 62.165.8.187 - - "GET /bestandnaam.html HTTP/1.1" 200 5848 "http://www.domeinnaam.nl/bestandnaam.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" how do i count which ip-adresses are mentioned... (3 Replies)
Discussion started by: FOBoy
3 Replies

5. Programming

Counting the words in a file

Please find the below program. It contains the purpose of the program itself. /* Program : Write a program to count the number of words in a given text file */ /* Date : 12-June-2010 */ # include <stdio.h> # include <stdlib.h> # include <string.h> int main( int argc, char *argv ) {... (6 Replies)
Discussion started by: ramkrix
6 Replies

6. Shell Programming and Scripting

Help in counting the no of repeated words with count in a file

Hi Pls help in solving my doubt.Iam having file like below file1.txt priya jenny jenny priya raj radhika priya bharti bharti Output required: I need a output like count of repeated words with name for ex: priya 3 jenny 2 (4 Replies)
Discussion started by: bha148
4 Replies

7. Shell Programming and Scripting

counting words with perl?

how to use perl to count number of lines, words characters in a file. (3 Replies)
Discussion started by: winter9
3 Replies

8. Shell Programming and Scripting

Counting occurrence of all words in a file

Hi, Given below is the input file: http://i53.tinypic.com/2vmvzb8.png Given below is what the output file should look like: http://i53.tinypic.com/1e6lfq.png I know how to count the occurrence of 1 word from a file, but not all of them. Can someone help please? An explanation on the... (1 Reply)
Discussion started by: r4v3n
1 Replies

9. Shell Programming and Scripting

Counting specific words from the log

Hi, I need a shell script which can provide details from error logs like this Aug 23 21:19:41 red mountd: authenticated mount request from bl0110.bang.m pc.local:651 for /disk1/jobs (/disk1) Aug 23 08:49:52 red dhcpd: DHCPDISCOVER from 00:25:90:2b:cd:7c via eth0: unknown client Aug 24... (2 Replies)
Discussion started by: ratheeshp
2 Replies

10. Shell Programming and Scripting

Counting occurrences of all words in multiple files

Hey Unix gurus, I would like to count the number occurrences of all the words (regardless of case) across multiple files, preferably outputting them in descending order of occurrence. This is well beyond my paltry shell scripting ability. Researching, I can find many scripts/commands that... (4 Replies)
Discussion started by: twjolson
4 Replies
TM::Tree(3pm)						User Contributed Perl Documentation					     TM::Tree(3pm)

NAME
TM::Tree - Topic Maps, trait for induced tree retrieval SYNOPSIS
use TM::Materialized::AsTMa; my $tm = new TM::Materialized::AsTMa (file => 'old_testament.atm'); Class::Trait->apply ( $tm => 'TM::Tree' ); $tm->sync_in; # old-testament pedigree print Dumper $tm->tree (lid => 'adam', type => 'has-parent', arole => 'parent', brole => 'child' ); # new-testament inverse pedigree print Dumper $tm->tree (lid => 'gw-bush', type => 'has-parent', arole => 'child', brole => 'parent' ); DESCRIPTION
Obviously, topic maps can carry information which is tree structured. A family pedigree is a typical example of it; associations having a particular type, particular roles and you can derive a tree structure from that. This is exactly what this operator does: it takes one topic map basis and primed with a starting node, an association type and two roles a tree will be returned to the caller. INTERFACE
Methods tree $treeref = $tm->tree ( $start_topic, $type_topic, $role_topic, $role_topic, [ depth => $integer ]) $treeref = $tm->tree_x ( $start_topic, $type_topic, $role_topic, $role_topic, [ depth => $integer ]) This function will analyze the topic map and will detect all maplets of the given type (direct and indirect ones) having the specified roles. Starting from the start topic it will so find other topics playing the brole. Those will be used as a next starting point, and so forth. To avoid the tree to become too big, you can impose an optional limit. Loops are detected. Every output tree node contains following fields: "lid": the lid of the node "children": a list reference of child nodes, there is no specific sort order "children*": Note: This is currently deactivated. for convenience this list reference contains all children, grand-children, grand-grand children.... of this node (this list is neither sorted nor unique out of performance considerations). The version "tree_x" does not honor subclassing of roles and type (but "tree" does). This means that is can be considerably faster, especially if you use it for taxonomy stuff with "isa" and "is-subclass-of". taxonomy $treeref = $tm->taxonomy ([ $start_lid ]) This function is a specialization of "tree", in that it looks at a particular association type ("is-subclass-of") and the appropriate roles ("superclass", "subclass"). Obviously the result is a tree holding all subtypes. The only optional parameter is a toplet "lid"; that becomes the starting point of the tree. If that parameter is missing, "thing" is assumed. SEE ALSO
TM COPYRIGHT AND LICENSE
Copyright 200[3-6] by Robert Barta, <drrho@cpan.org> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-02-15 TM::Tree(3pm)
All times are GMT -4. The time now is 04:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy