Sponsored Content
Full Discussion: counting words
Top Forums UNIX for Dummies Questions & Answers counting words Post 302355880 by FOBoy on Thursday 24th of September 2009 03:15:39 AM
Old 09-24-2009
counting words

if i have a long list of data, with every line beginning with an ip-address, like this:

62.165.8.187 - - [24/Oct/2002:23:13:42 +0200] "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 the most?

i don't know which ip-adresses to search so i can't give an input how many times a specific word is mentioned, i just want to know which are mentioned the most.
 

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. Shell Programming and Scripting

Counting words

Hi Is there a way to count the no. of words in all files in directory. All are text files.I use wc -w but somehow i am not getting the rite answer. Is there an alternative. Thanks in advance (9 Replies)
Discussion started by: kinny
9 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
od(1)							      General Commands Manual							     od(1)

Name
       od - create file octal dump

Syntax
       od [options] [file] [offset] [label]

Description
       The  command displays file, or its standard input, in one or more dump formats as selected by the first argument.  If the first argument is
       missing, -o is the default.  Dumping continues until end-of-file.

Options
       -a[p|P] Interprets bytes as characters and display them with their ACSII names.	If the p character is given also,  then  bytes	with  even
	       parity are underlined.  The P character causes bytes with odd parity to be underlined.  Otherwise the parity bit is ignored.

       -b      Displays bytes as unsigned octal.

       -c      Displays  bytes	as ASCII characters.  Certain non-graphic characters appear as C escapes: null=, backspace=, formfeed=f, new-
	       line=
, return=
, tab=	; others appear as 3-digit octal numbers.  Bytes with the parity bit set are displayed in octal.

       -d      Displays short words as unsigned decimal.

       -f      Displays long words as floating point.

       -h      Displays short words as unsigned hexadecimal.

       -i      Displays short words as signed decimal.

       -l      Displays long words as signed decimal.

       -o      Displays short words as unsigned octal.

       -s[n]   Looks for strings of ASCII characters of n minimum length.  By default, the minimum length is 3 characters.

       -v      Displays all data and indicates lines identical to the last line shown with an * in column 1.

       -w[n]   Specifies the number of input bytes to be interpreted and displayed on each output line. If w is not specified, 16 bytes  are  read
	       for each display line.  If n is not specified, it defaults to 32.

       -x      Displays short words as hexadecimal.

       An upper case format character implies the long or double precision form of the object.

       The  offset  argument  specifies  the  byte  offset into the file where dumping is to commence.	By default this argument is interpreted in
       octal.  A different radix can be specified; If ``.'' is appended to the argument, then offset is interpreted in decimal.  If offset  begins
       with  ``x'' or ``0x'', it is interpreted in hexadecimal.  If ``b'' (``B'') is appended, the offset is interpreted as a block count, where a
       block is 512 (1024) bytes.  If the file argument is omitted, an offset argument must be preceded by ``+''.

       The radix of the displayed address is the same as the radix of the offset, if specified; otherwise it is octal.

       The label is interpreted as a pseudo-address for the first byte displayed.  It is shown	in  ``()''  following  the  file  offset.   It	is
       intended to be used with core images to indicate the real memory address.  The syntax for label is identical to that for offset.

Restrictions
       A file name argument can't start with ``+''.  A hexadecimal offset can't be a block count.  Only one file name argument can be given.

       It is an historical botch to require specification of object, radix, and sign representation in a single character argument.

See Also
       adb(1) - VAX only, dbx(1)

																	     od(1)
All times are GMT -4. The time now is 05:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy