0
使用轉義序列我想;
通過TERMINATED BY '\034' STORED AS TEXTFILE;
在sed命令
我使用sed
命令,但是它的通過;
sed "s|;|TERMINATED BY '\034' STORED AS TEXTFILE|"
更換\0
我試圖\\034
,但它不工作來代替。
使用轉義序列我想;
通過TERMINATED BY '\034' STORED AS TEXTFILE;
在sed命令
我使用sed
命令,但是它的通過;
sed "s|;|TERMINATED BY '\034' STORED AS TEXTFILE|"
更換\0
我試圖\\034
,但它不工作來代替。
使用此sed
:
sed "s|;|TERMINATED BY '\\\034' STORED AS TEXTFILE|"
如果perl
的解決方案是好的,q operator有利於在這種情況下
$ echo 'abc ; xyz' | perl -pe "s/;/q(TERMINATED BY '\034' STORED AS TEXTFILE)/e"
abc TERMINATED BY '\034' STORED AS TEXTFILE xyz
精湛的男人!有效。非常感謝 :) –