I need to grep for a pattern in a file. Files are huge and have several repeated occurances of the strings which match pattern. I just need the strings which contain the pattern in the output.
For eg.
The contents of my file are as follows. The pattern I want to match by is ABCD
... (5 Replies)
I have a sorted file like:
Apple 3
Apple 5
Apple 8
Banana 2
Banana 3
Grape 31
Orange 7
Orange 13
I'd like to search $1 and if $1 is not the same as $1 in the previous row print that row and print the number of times $1 was found.
so the output would look like:
Apple 8 3
Banana... (2 Replies)
Hello Guys
I have a flat file with '|~|' delimited
When I use to record count using below command
awk -FS"+" ' {print $colno}' filename | wc -l
the count is fine
But when I am trying to find the unique number of record the o/p is always 1
awk -FS"+" ' {print $colno}'... (11 Replies)
Hi,
Im looking for a script which will calculate the unique strings column 2 & 3 values in a log as mentioned in example
eg:-
bag 12 12
bag 18 15
bags 15 13
bags 15 14
blazer 24 24
blazer 33 32
boots 19 15
Result should be:-
bag 30 27
bags 30 27... (9 Replies)
how to display the unique strings in two files using shell script or commands.
I tried diff and cmp but it shows the entire line, i need only the mismatched strings.
File1:
sat,sun,mon,tue
rose,lilly,lotus
white,red,blue,green,pink
File2:
sat,sun,mon,tue
rose,sunflower,lotus... (4 Replies)
Im looking for an awk script that will take the unique values in column 5, then print and count the unique values in column 6.
CA001011500 11111 11111 -9999 201301 AAA
CA001012040 11111 11111 -9999 201301 AAA
CA001012573 11111 11111 -9999 201301 BBB
CA001012710 11111 11111 -9999 201301... (4 Replies)
When I use the below awk to count the unique lines in $4 for the input it seems to work. The answer is 3 because $4 is only unique 3 times in all the entries. However, when I use the same on actual data I get 56,536 and I know the answer should be 56,548. My question is there a better way to... (8 Replies)
Hello Team,
I need your help on the following:
My input file a.txt is as below:
3330690|373846|108471
3330690|373846|108471
0640829|459725|100001
0640829|459725|100001
3330690|373847|108471
Here row 1 and row 2 of column 1 are identical but corresponding column 2 value are... (4 Replies)
Hello,
I am trying to count unique rows in my file based on 4 columns (2-5) and to output its frequency in a sixth column. My file is tab delimited
My input file looks like this:
Colum1 Colum2 Colum3 Colum4 Coulmn5
1.1 100 100 a b
1.1 100 100 a c
1.2 200 205 a d
1.3 300 301 a y
1.3 300... (6 Replies)
Discussion started by: nans
6 Replies
LEARN ABOUT DEBIAN
wnstats
WNSTATS(7WN) WordNettm WNSTATS(7WN)NAME
wnstats - WordNet 3.0 database statistics
DESCRIPTION
Number of words, synsets, and senses
+----------+---------+---------+------------------+
| POS | Unique | Synsets | Total |
| | Strings | | Word-Sense Pairs |
+----------+---------+---------+------------------+
|Noun | 117798 | 82115 | 146312 |
|Verb | 11529 | 13767 | 25047 |
|Adjective | 21479 | 18156 | 30002 |
|Adverb | 4481 | 3621 | 5580 |
+----------+---------+---------+------------------+
|Totals | 155287 | 120982 | 206941 |
+----------+---------+---------+------------------+
Polysemy information
+----------+------------------+------------+------------+
| POS | Monosemous | Polysemous | Polysemous |
| | Words and Senses | Words | Senses |
+----------+------------------+------------+------------+
|Noun | 101863 | 15935 | 44449 |
|Verb | 6277 | 5252 | 18770 |
|Adjective | 16503 | 4976 | 14399 |
|Adverb | 3748 | 733 | 1832 |
+----------+------------------+------------+------------+
|Totals | 128391 | 26896 | 79450 |
+----------+------------------+------------+------------+
+----------+----------------------------+----------------------------+
| POS | Average Polysemy | Average Polysemy |
| | Including Monosemous Words | Excluding Monosemous Words |
+----------+----------------------------+----------------------------+
|Noun | 1.24 | 2.79 |
|Verb | 2.17 | 3.57 |
|Adjective | 1.40 | 2.71 |
|Adverb | 1.25 | 2.50 |
+----------+----------------------------+----------------------------+
NOTES
Statistics for all types of adjectives and adjective satellites are combined.
The total of all unique noun, verb, adjective, and adverb strings is actually 147278. However, many strings are unique within a syntactic
category, but are in more than one syntactic category. The figures in the table represent the unique strings in each syntactic category.
WordNet 3.0 Dec 2006 WNSTATS(7WN)