bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sed problem with ^ and \


From: Jonathan_Cook
Subject: sed problem with ^ and \
Date: Tue, 15 Mar 2005 13:23:21 +0100

Hi there,

We just moved from HP-UX 11 to Linux and I have a behaviour difference 
with a regular expression pattern with sed.

My sed filter is supposed to delete everything in the file that is not 
between <SQL> and </SQL>

        /^\<SQL>/,/\<\/SQL\>/!d

This worked fine on HP-UX but on Linux the ^ doesn't seem to be 
recognised to mean "start of line" and it also doesn't seem to like the 
\ escape before the < or >.

I see in the regexp man page that -lineanchor can enable treatment of ^ 
and $ as start and end of line but I can't see how to get sed to 
recognise that.

Any help gratefully appreciated.

Regards,

Jonathan Cook
Cargill International S.A.
World Trading Unit, IT
14 Chemin De-Normandie
CH-1206 Geneva
 
Mobile: +41 -76 440 4147
Office: +41 -22 703 2946
Email:  address@hidden

Confidentiality Note: This message is intended only for the named 
recipient and may contain confidential, proprietary or legally 
privileged information. Unauthorized individuals or entities are not 
permitted access to this information. Any dissemination, distribution, 
or copying of this information is strictly prohibited. If you have 
received this message in error, please advise the sender by reply 
e-mail, and delete this message and any attachments. Thank you.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]