How to specify more spaces for the delimiter using cut?

前端 未结 12 682
遥遥无期
遥遥无期 2020-12-04 05:51

Is there any way to specify a field delimiter for more spaces with the cut command? (like \" \"+) ? For example: In the following string, I like to reach value \'3744\', wha

12条回答
  •  日久生厌
    2020-12-04 06:12

    As an alternative, there is always perl:

    ps aux | perl -lane 'print $F[3]'
    

    Or, if you want to get all fields starting at field #3 (as stated in one of the answers above):

    ps aux | perl -lane 'print @F[3 .. scalar @F]'
    

提交回复
热议问题