I try to delete all lines who beginn with some optional special chars followed by blubb:
thats the lines I wanna match:
#blubb
*blubb
-blubb
blubb
thats should do it, but dont work :(
sed "/^.?blubb$/d" -i special.conf
sed "/^[#*-]?blubb$/d" -i special.conf
Has somebody the right solution?
Use this sed command:
sed -i.old '/^[#*-]\{0,1\}blubb/d' special.conf
OR
sed -i.old -E '/^[#*-]?blubb/d' special.conf
OR
sed -i.old -r '/^[#*-]?blubb/d' special.conf