[英]Remove hidden characters from an excel.csv file
I have a large excel file containing a list of numbers (numbers.csv) 我有一个很大的Excel文件,其中包含数字列表(numbers.csv)
1234
1235
1236
1237
However when I use 但是当我使用
cat numbers.csv
it returns 它返回
1234,,
1235,,
1236,,
1237,,
I'm not sure how to fix this, but I think sed might be the right approach? 我不确定如何解决此问题,但我认为sed可能是正确的方法? relatively new to this, so trying to figure it out. 相对较新,因此请尝试解决。
I would like generate a new file (numbers2.csv) to just contain the numbers and no ,, or other characters. 我想生成一个新文件(numbers2.csv),只包含数字,不包含,或其他字符。
This should do: 应该这样做:
sed 's/,//g' numbers.csv
1234
1235
1236
1237
If you like to edit the original file. 如果您想编辑原始文件。
sed -i 's/,//g' numbers.csv
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.