我使用cut -d' ' -f1在unix脚本中拆分字符串。不过,我只想要f1和f5,但我无法做到这一点。
我试着给-f1-5,但是从第一到第五,所有字段都打印出来了。
发布于 2018-11-30 11:59:50
cut -d' ' -f1,5来自man cut
-f, --fields=LIST
select only these fields然后晚些
Each LIST is made up of one range, or many ranges separated by commas.https://unix.stackexchange.com/questions/485130
复制相似问题