基本解釋n.測(cè)試文件同根派生 testfile相關(guān)詞英漢例句$ awk '{ sub(/test/, "mytest");print }' testfile $ awk '{ sub(/test/, "mytest");$1}; print }' testfile 第一個(gè)例子在整個(gè)記錄中匹配,替換衹發(fā)生在第一次匹配發(fā)生的時(shí)候。$ awk '{ gsub(/test/, "mytest");print }' testfile $ awk '{ gsub(/test/, "mytest"), $1 }; print }' testfile[/pre]第一個(gè)例子在整個(gè)文檔中匹配test,匹配的都被替換成mytest。testfile更多例句