1.删除注释行sed -i '/^#/d' filename2.删除空行sed -i '/^$/d' filename3.替换sed 's/123/abc/g' filename