#!/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
时间: 2024-10-15 06:21:05