如何用SHELL正确分割CSV文件中的列
答案:1 悬赏:0 手机版
解决时间 2021-04-04 03:46
- 提问者网友:记得曾经
- 2021-04-03 14:49
如何用SHELL正确分割CSV文件中的列
最佳答案
- 五星知识达人网友:由着我着迷
- 2021-04-03 15:07
2种方法:
#方法1:
awk -F, '{print $1","$4","$7}' no1/test.csv no2/test.csv no3/test.csv > newtext.csv
#方法2:
cat no1/test.csv no2/test.csv no3/test.csv | cut -d, -f1,4,7 > newtext.csv
#方法1:
awk -F, '{print $1","$4","$7}' no1/test.csv no2/test.csv no3/test.csv > newtext.csv
#方法2:
cat no1/test.csv no2/test.csv no3/test.csv | cut -d, -f1,4,7 > newtext.csv
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯