#!/bin/bash#用途:#1.当前目录的txt文件批量转csv#2.制表符转逗号分隔符#3.NULL去除#4.删除WARN警告for i in `ls ./*.txt` do sed -e 's/\t/,/g' -e 's/NULL//g' -e '/^WARN:/d' $i >$i.csv done
本文共 218 字,大约阅读时间需要 1 分钟。
#!/bin/bash#用途:#1.当前目录的txt文件批量转csv#2.制表符转逗号分隔符#3.NULL去除#4.删除WARN警告for i in `ls ./*.txt` do sed -e 's/\t/,/g' -e 's/NULL//g' -e '/^WARN:/d' $i >$i.csv done
转载于:https://www.cnblogs.com/junstudys/p/9420545.html