I can use lsof to get top open files stat for processes, as below:
$ lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr | head -n 5
17955 11945
10282 2786
5980 32152
1920 27803
1786 32107
Now I want to expand the result to like below with one line bash command,
$ lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr | head -n 5 ...
17955 11945 java
10282 2786 python
5980 32152 ruby
1920 27803 go
1786 32107 rust
How can I achieve this?