delete lines from a file.

I have a file which has about 500K records and I need to delete about 50 records from the file. I know line numbers and am using
sed '13456,13457,......d' filename > new file.
It does not seem to be working.
Any help will greatly appreciated.

how about useing perl and the TIE function load the file into an array and cycle through the file leaving out the elements you dont want in the file?

Try:
sed '13456d;13457d' filename > newfile

It works when you put double quotes instead of single quotes.
sed "line1,line2..d" filename.

If You know the begining line number say p and the end line number you can use the follwing:

say begining line number=16
ending line number =25
file=file

#!/bin/sh
p=16
q=25
p=` expr $q - $p`
head -$q file | tail -$p >>file1.c

If You know the begining line number say p and the end line number you can use the follwing:

say begining line number=16
ending line number =25
file=file

#!/bin/sh
p=16
q=25
p=` expr $q - $p`
head -$q file | tail -$p >>file1.c