I would like to get the last column of this sample:[  3]  1.0- 2.0 sec  1.00 MBytes  8.39 Mbits/sec[  3]  2.0- 3.0 sec   768 KBytes  6.29 Mbits/sec[  3]  3.0- 4.0 sec   512 KBytes  4.19 Mbits/sec[  3]  4.0- 5.0 sec   256 KBytes  2.10 Mbits/sec...If I use cut -d\  -f 13I get Mbits/sec6.294.192.10because sometimes there are additional spaces in between.
How do I use cut to separate by multiple whitespace?
text processing;columns;cut
To answer your question literally:sed 's/   */:/g' | cut -d : -f 5orawk -F '  +' '{print $5}'But that won't do if the number in brackets reaches 10, etc. If you're only interested in the numbers, you could remove everything else.sed 's/[^.0-9][^.0-9]*/:/g' | cut -d : -f 6