Please see the following code, between "status" and "OK" exists many spaces, I want to get
status OK
. how to ignore multi spaces? If tab exists in the spaces, how to ignore it ?
Is there other commands can replace cut?
[river@localhost CLI008003]$ echo 'drv status OK'| cut -d " " -f 2-3
status
[river@localhost CLI008003]$ echo 'drv status OK'| cut -d " " -f 2-
status OK
[river@localhost CLI008003]$ echo 'drv status OK'| cut -d " " -f 3
[river@localhost CLI008003]$