This will not work:
Can only be done with grep:
 xm list | grep -P -o '(?<=^([^ ]+ ){3}).*$' 
Grep on my phone does not know the -P flag, so I canβt check it right now, but this should work.
But this works fine:
Ok, the previous code doesn't work, yes. I also tried to get the fourth column instead of the second.
But still I insist that this can be done with grep !
 xm list | grep -P -o '^test2\s+\K[^ ]+' 
This code has been tested and works :)
The point here is that \K will reset the previously agreed text.
 source share