sed文本替换 sed ‘2s/1/2/g’ test.log(将第二行全部改成2) sed ‘s/1/2/2’ test.log(将第二列全部变成2) sed ‘s/1/2/g’ test.log(全部替换成2)