linux的替换:sed -i 2019-11-15 #Unix #Shell sed -i "s/查找字段/替换字段/g" 例如:test.txt包括: a;b c;d 使用命令把;替换成换行符: sed -i "s/;/\\n/g" test.txt 而后,test.txt变为: a b c d