I had a file with subversions i want to grep only top two result from each version.
hostname:~ sagar$ cat test.txt v9.0 v9.1 v9.2 v9.3 v8.0 v8.1 v8.2 v8.3 v7.1 v7.2 v7.3 v7.4
v9.3 v9.2 v8.3 v8.2 v7.4 v7.3
I have tried sort,grep,head combinations but unable to extract the exact format of top two results set from each version. I want to do this in single line command apart from using script