Sed one-liner to delete any line that begins with a digit

regular expressionsed

enter image description here

Pretend I am working with this file.

The beginning of the first visible line is obscured, so ignore that. 43 is the beginning of the next line, and that line would be deleted.

The next line (which begins with 44 and ends with a period) would be deleted.

The next line (which consists solely of 424) is also gone.

The next line (which consists of '11. King and Hero') is also gone.

The next line stays.

Best Answer

sed -e '/^[0-9]/d' filename > filename.new

or to modify in place

sed -i -e '/^[0-9]/d' filename
Related Question