false use of sed???

i want to delete every newline and every line which starts with "RECORD......." in a file.

FILE:
Record 61391 in base BROCKHAUS (Timestamp: 2008-04-09 11:38:38)
UNTERTITEL :
Gr�fin (seit 1707 Reichsgr�fin) von, * Schwerin 4. 2. 1686, + Berlin
21. 10. 1744; wurde
Record 61392 in base BROCKHAUS (Timestamp: 2008-04-09 11:38:38)
UNTERTITEL :
von, K�nstler, * Schilde (heute zu Weisen, Landkreis Prignitz) 19.
9. 1934, + (Flugzeugabsturz) in den Schweizer Alpen 20. 8. 1983;
Record 61400 in base BROCKHAUS (Timestamp: 2008-04-09 11:38:38)
UNTERTITEL :

my command:

cat untertitel.txt|sed -e '/^[ ]$/d'|sed 's/^RECORD.$//g'

what is my mistake? :confused: can anyone tell me?

cat untertitel.txt|sed -e '/^$/d'|sed 's/^RECORD.*$//g'

the mistake was that i used the $ sign after the .*

hi

cat untertitel.txt|sed -e '/^$/d'|sed 's/^RECORD.*$//g'

In the above line , i think you are deleting blank lines and replacing all the lines which starts with RECORD with null value ( Deletion is not taking place ).

The sed script may be like this:

sed -e '/^$/d' -e '/^RECORD/d' untertitel.txt

Thanks
--penchal

Or with awk:

awk '/^RECORD/||!NF{next}1' file

Regards