awk替換文件中字符串 如何用sed或awk模糊匹配指定字符串并刪除/替換?
如何用sed或awk模糊匹配指定字符串并刪除/替換?Sed:Sed“s/a。。E/[replace with string,do not write or delete]/g“文件名上面是找一個字符串
如何用sed或awk模糊匹配指定字符串并刪除/替換?
Sed:Sed“s/a。。E/[replace with string,do not write or delete]/g“文件名上面是找一個字符串如**E,還可以寫其他正則表達(dá)式,并刪除或替換awk:awk”{gsub(/a)。。E/,“replace content or empty”)print}“文件名如上所述,將替換內(nèi)容寫成空字符串來實(shí)現(xiàn)刪除功能。