Hey
As part of my studies I started learning about Kali Linux as my first ever Linux distro.
Lately we learned a bit about the QTerminal, pipes & sorting
We now have been given a list with ~10000 words
Out of these 10000 words there are 100 words that are similiar but have different numbers in the end (so 100 different words in total)
Our task is to to find the one with the highest number for each word so that we only have every word only once:
--------------------------------
e.g:
Banana 32
Apple 34
Car 231
Car 213
Apple 12
Banana 549
Turns into:
Apple 34
Banana 549
Car 231
---------------------------------
Now to my problem:
I've tried out the different options (-n, -s, -t...) that sort provides but I always end up with the words that are similiar getting sorted together but the numbers behind them are still mixed and not in the right order (descending or ascending)
I attached a picture to show what it looks like after I try to sort it:
As you can see the words are grouped but the numbers are still mixed
As part of my studies I started learning about Kali Linux as my first ever Linux distro.
Lately we learned a bit about the QTerminal, pipes & sorting
We now have been given a list with ~10000 words
Out of these 10000 words there are 100 words that are similiar but have different numbers in the end (so 100 different words in total)
Our task is to to find the one with the highest number for each word so that we only have every word only once:
--------------------------------
e.g:
Banana 32
Apple 34
Car 231
Car 213
Apple 12
Banana 549
Turns into:
Apple 34
Banana 549
Car 231
---------------------------------
Now to my problem:
I've tried out the different options (-n, -s, -t...) that sort provides but I always end up with the words that are similiar getting sorted together but the numbers behind them are still mixed and not in the right order (descending or ascending)
I attached a picture to show what it looks like after I try to sort it:
As you can see the words are grouped but the numbers are still mixed