output the 2nd column of a file

前端 未结 4 886
孤独总比滥情好
孤独总比滥情好 2020-12-30 01:15

given a file with two columns, separatedly by standard white space

a b
c d
f g
  h

how do I output the second column

4条回答
  •  太阳男子
    2020-12-30 01:41

    Use cut with byte offsets:

    cut -b 3
    

    Use sed to remove trailing columns:

    sed s/..//
    

提交回复
热议问题