in reply to Re^5: Delete till end of line to another string
in thread Delete till end of line to another string

Hi, I am not able to debug the script. When I grep for
<HEADLINE>
tag in a file grep '<HEADLINE>' 9702050900.xml It prints out as below. <HEADLINE>EVITE LA ENFERMEDAD PERIODONTAL PRA CTIQUE LA HIGIENE DENTAL PARA CUIDAR SUS ENC�AS</HEADLINE> But when I vi the file to view, it displays
<COLUMN>Nuestro hijos.</COLUMN> + AS</HEADLINE> <LEAD>C......</LEAD>
The problem is very strange. Anyone please help me

Replies are listed 'Best First'.
Re^7: Delete till end of line to another string
by rovf (Priest) on Aug 19, 2009 at 08:27 UTC
    Have a look at the file with a Hex viewer (for instance on Unix or other reasonable operating systems, using
    od -cx FILENAME | less
    . Maybe you find some conspicuous control character, such as an isolated carriage return (0x0DH).

    -- 
    Ronald Fischer <ynnor@mm.st>