Sponsored Content
Top Forums Shell Programming and Scripting Uniq adresses with number of occurrence Post 302471380 by in2nix4life on Friday 12th of November 2010 03:38:19 PM
Old 11-12-2010
No problem. Interesting. On my distro (Arch Linux), it yielded the correct output without the 'sorts', but the bottomline is you got the answer you were looking for.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

optimizing - to find the number of occurrence

Hi, I need to find the number of occurrence of string in a file, for ex: >cat filename abc abc def ghi ghi ghi ghi abc abc >output would be abc 4 def 1 (10 Replies)
Discussion started by: matrixmadhan
10 Replies

2. UNIX for Dummies Questions & Answers

Line number of an occurrence using grep

Hi All, is there a way to extract the line number of an occurrence using grep? I know that with the -n option it prints out the line number as well. I would like to assign the line number to a variable. Thanks, Sarah (5 Replies)
Discussion started by: f_o_555
5 Replies

3. UNIX for Dummies Questions & Answers

line number of the i-th occurrence of a pattern

Hi all, is there a simple way to obtain the line number of the i-th occurrence of a pattern? I have OCCURRENCE=`grep -io "${STRING_NAME}" ${1}-${8}${EXT}.out_bis| wc -l` which tells me how many occurency I have. I would like to go through them and determine the line number and assign... (6 Replies)
Discussion started by: f_o_555
6 Replies

4. Shell Programming and Scripting

Replace x Number of String Occurrence with Sed

Ok, So I have a huge file that has over 12000 lines in it. in this file, there are 589 occurrences of the string "use five-minute-interval" spread in various areas in the file. How can i replace the the last 250 of the occurrences of "use five-minute-interval" with "use... (10 Replies)
Discussion started by: SkySmart
10 Replies

5. Shell Programming and Scripting

Count number of occurrence at each line

Hi I have the following file ENST001 ENST002 4 4 4 88 9 9 ENST004 3 3 3 99 8 8 ENST009 ENST010 ENST006 8 8 8 77 8 8 Basically I want to count how many times ENST* is repeated in each line so the expected results is 2 1 3 Any suggestion please ? (4 Replies)
Discussion started by: fuad_
4 Replies

6. Shell Programming and Scripting

number of occurrence

: i need a bash script to convert the displayed output 12 14 15 12 15 13 to 12 * 2 ,13 * 1,14*1,15*1 Thanks, nevil (2 Replies)
Discussion started by: nevil
2 Replies

7. Shell Programming and Scripting

Count number of occurrence of a string in file

if there's a file containing: money king money queen money cat money also money king all those strings are on one line in the file. how can i find out how many times "money king" shows up in the line? egrep -c "money king" wont work. (7 Replies)
Discussion started by: SkySmart
7 Replies

8. Shell Programming and Scripting

How to count the occurrence of a number?

Hi, I have a file which contained a set of numbers like Col1 col2 col3 col4 1 sa 13 0 2 sb 14 0 3 sc 15 9 4 sd 16 -9 5 sd 20 -2 6 sd 20 4 Here in last column I need to count the zeros, positive values and negative values, please help me to do that. (2 Replies)
Discussion started by: Shenbaga.d
2 Replies

9. Shell Programming and Scripting

awk to find the number of occurrence

My file contains like this on 10 th line NM1*IL*1* awk '/NM1/{print NR}' *.dat output is 10 awk '/NM1*IL*1*/{print NR}' *.dat output is Nothing but im expecting 10 on second code as well . (4 Replies)
Discussion started by: Rajesh_us
4 Replies

10. Shell Programming and Scripting

awk or other way to find out number of occurrence of 7th character

Hi all, I am looking for to filter out based on 7th character and list the number of occurrence based on the 7th character if p , d , o or m 1. if 7th character is p , Output should be: p_hosts = N 2. if 7th character is d , Output should be: d_hosts = N 3. if 7th character is o , Output... (10 Replies)
Discussion started by: rveri
10 Replies
apertium-lextor(1)														apertium-lextor(1)

NAME
apertium-lextor - This application is part of ( apertium ) This tool is part of the apertium machine translation architecture: http://apertium.org. SYNOPSIS
apertium-lextor --trainwrd stopwords words n left right corpus model [ --weightexp w ] [ --debug ] apertium-lextor --trainlch stopwords lexchoices n left right corpus wordmodel dic bildic model [ --weightexp w ] [ --debug ] apertium-lextor --lextor model dic left right [ --debug ] [ --weightexp w ] DESCRIPTION
apertium-lextor is the application responsible for training and usage of the lexical selector module. OPTIONS
--trainwrd | -t Train word co-occurrences model. It needs the following required parameters: stopwords file containing a list of stop words. Stop words are ignored. words file containing a list of words. For each word a co-occurrence model is built. n number of words per co-occurrence model (for each model, the n most frequent words). left left-side context to take into account (number of words). right right-side context to take into account (number of words). corpus file containing the training corpus. model output file on which the co-occurrence models are saved. --trainlch | -r Train lexical choices co-occurrence models using a target language co-occurrence model and a bilingual dictionary. It needs the following required parameters: stopwords file containing a list of stop words. Stop words are ignored. lexchoices file containing a list of lexical choices. For each lexical choice a co-occurrence model is built. n number of words per co-occurrence model (for each model, the n most frequent words). left left-side context to take into account (number of words). right right-side context to take into account (number of words). corpus file containing the training corpus. wordmodel target-language word co-occurrence model (previously trained by means of the --trainwrd option). dic the lexical-selection dictionary (binary format). bildic the bilingual dictionary (binary format). model output file on which the co-occurrence models are saved. --lextor | -l Perform the lexical selection on the input stream. It needs the following required parameters: model file containing the model to be used for the lexical selection. dic lexical-selection dictionary (binary format). left left-side context to take into account (number of words). right right-side context to take into account (number of words). --weightexp w Specify a weight value to change the influence of surrounding words while training or performing the lexical selection. The parameter w must be a positive value. --debug | -d Show debug information while working. --help | -h Shows this help. --version | -v Shows license information. SEE ALSO
apertium-gen-lextorbil(1), apertium-preprocess-corpus-lextor(1), apertium-gen-stopwords-lextor(1), apertium-gen-wlist-lextor(1), aper- tium-gen-wlist-lextor-translation(1), apertium-lextor-eval(1), apertium-lextor-mono(1). BUGS
Lots of...lurking in the dark and waiting for you! AUTHOR
(c) 2005,2006 Universitat d'Alacant / Universidad de Alicante. All rights reserved. 2006-12-12 apertium-lextor(1)
All times are GMT -4. The time now is 04:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy