^表示行头
删除空行
sed "/^$/d"
删除#开头的行
sed "/^#/d"
删除第一行:
sed -i "1d" a.txt
sed删除空行,#开头的行,以及第一行
原文:https://www.cnblogs.com/fqnb001/p/12579334.html