Question: My data table looks like that:

```
chr4    124097568       124098568       337
chr4    159597106       159598106       1000   
chr4    159597106       159598106       1000 
chr4    164361532       164362532       455
chr4    164361532       164362532       74
chr4    164361532       164362532       2
chr4    170360150       170361150       0

```

I want to: Extract unique rows - if data in col#2 & col#3 is the same -> just the highest value (col#4) row should be extracted. If #2,#3 & #4 are identical just one of the rows should be extracted. 

Preferred output is:

```
chr4    124097568       124098568       337
chr4    159597106       159598106       1000 
chr4    164361532       164362532       455
chr4    170360150       170361150       0

```

If something is not clear I'll try to explain it more (cause I really need to solve this problem now).

Answer: 
```
$ cat example.txt
chr4    124097568       124098568       337
chr4    159597106       159598106       1000   
chr4    159597106       159598106       1000 
chr4    164361532       164362532       455
chr4    164361532       164362532       74
chr4    164361532       164362532       2
chr4    170360150       170361150       0

$ sort --key=2 -g -u example.txt 
chr4    124097568       124098568       337
chr4    159597106       159598106       1000   
chr4    164361532       164362532       455
chr4    170360150       170361150       0

```
That would be easier if the last column (COL#4) was "right space padded", like this:

```
chr4    124097568       124098568        337
chr4    159597106       159598106       1000   
chr4    159597106       159598106       1000 
chr4    164361532       164362532        455
chr4    164361532       164362532         74
chr4    164361532       164362532          2
chr4    170360150       170361150          0

```

That way, a combination of sort and uniq could do the trick.