The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
13 views

Printing unique lines with uniq, OS X Yosemite

I am trying to print the unique entries in a column of a .csv file. For this, I tried the following: awk -F "," '{print $6}' dataCoarse.csv | uniq -u which just prints the 6th column as it is. ...
0
votes
2answers
21 views

Sort on ID, then sort on date, then remove lines which have the older date?

I have a couple of tab delimited files. Each file is structured like so: ID Title Rating Date_Rated What I want to do is merge all these files into one, ...
0
votes
3answers
22 views

Filtering 2nd field from a data set and then using uniq on the output

I've got a dataset that goes like this: AAAAA 11111 Data1 AAAAA 11111 Data2 AAAAA 11111 Data3 AAAAA 11112 Data4 AAAAA 11112 Data5 AAAAA 11112 Data6 AAAAA 11112 Data7 AAAAA 11113 Data8 AAAAA 11114 ...
0
votes
1answer
22 views

Sort piped to uniq unexpected output

I have a file that looks like this: "string",192.168.1.0,,TX,192.168.1.2,,,100,0,0,10,10,10,, "string",192.168.1.0,,TX,192.168.1.1,,,100,0,0,10,10,10,, ...
0
votes
3answers
223 views

remove lines with duplicate words

I have a sorted file with lines like this word1 abca word1 abcb word1 abcc word2 abca word2 abcb word3 abbb ........... and i want to have something like this word1 abca word2 abca word3 ...
0
votes
1answer
47 views

How to print statistics from lines in a file

I often find myself computing percentages manually after filtering through a log file to find the proportion of X or Y in it. Can this easily be achieved via common CLI tools?
0
votes
1answer
240 views

Counting duplicates lines from a stream

I'm currently parsing apache logs with that command: tail -f /opt/apache/logs/access/gvh-access_log.1365638400 | grep specific.stuff. | awk '{print $12}' | cut -d/ -f3 > ~/logs The output is a ...
6
votes
3answers
423 views

Remove duplicates in each line of a file

How can I remove duplicates in each line, for example here? 1 1 1 2 1 2 3 5 5 4 1 2 3 3 I'd like to get this output: 1 2 3 5 4 1 2 3 There are lots of lines (100,000) and in each line I want ...
0
votes
2answers
1k views

linux sort -n uniq -c

I have a text file which contains about 50MB of text: valA valB valC valZ valB Whats the quickest way to: cat the file Display the unique appearences
0
votes
1answer
91 views

gnu `uniq -c`: display counts graphically as bars

With sort $file | uniq -c, it's possible to sum up files/input and show the number occurences like that: 13 foo 1 bar To get a better grasp of this data, I'd like to see them graphically ...
1
vote
1answer
219 views

gnu sort/uniq: sorting by number of times

How can I use GNU sort and uniq to have the most common occurrences on top instead of numerical or alphanumerical sorting? Example list.txt: 1 2 2 2 3 3 Since '2' occurs 3 times, should be on top, ...
0
votes
2answers
137 views

lines identical except for their first word, put the first word in a variable

I have file(sudoers) in which lines can be identical except for the first word in them (different users can execute the same set of commands). I am able to extract such a line using the command: # ...
0
votes
1answer
272 views

option -f for linux command

this is the content of test file: this this this that is that a that MAP that map that when I do uniq testCase -f1, the result is: this this this that which is reasonable, but ...