I want to sort on a certain column only for rows containing a certain word. I don't want to see rows not containing that word. For example I have this text file:
sdf ggfds 7
sdf sgs 5
sdf dfgs 3
foo dffg 2
bar dffg 2
sdf sddfg 4
I want to sort 3rd column for rows containing only "sdf" word (doesnt have to be in a first column)
and I want to see this output:
sdf dfgs 3
sdf sddfg 4
sdf sgs 5
sdf ggfds 7