1.某一行增加注释#
sed -i '3,4s/^/#/' yang >>>将第3,4行,行首添加注释#,yang为文件名
2.某一行删减注释#
sed -i '1,2s/^#//' yang >>>将第1,2行,行首删掉#,yang为文件名
3.替换某一行中的内容
sed -i '3s/8080/9000/' yang >>>将文件中,第三行的8080,替换成9000
4.替换文件中包含的某个内容
sed -i 's/8080/9000/' yang >>>将整个文件中的8080,替换成9000