[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Gnu SED inexplicably requires quoting of carat following plain left pare
From: |
Stephen Salisbury |
Subject: |
Gnu SED inexplicably requires quoting of carat following plain left parenthesis |
Date: |
Mon, 18 Aug 2003 12:20:12 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1 |
To Whom It May Concern:
There seems to me to be a problem with GNU Sed 4.07 on Debian Linux (and
reported the same with Gnu Sed 4.0x on Cygwin32) having to do with carat
/ circumflex characters ("^") after a plain left parenthesis.
Specifically, given the one-line input file ("input"):
a(^b
the command
$ sed "s/(^/X/" < input
does not match the "(^" and emits the input text unmodified.
But if I add a backslash before the carat:
$ sed "s/(\^/X/" < input
I get the expected output:
aXb
Given the POSIX documentation, it is my impression that "^" MAY be
treated as a meta-character when it begins an expression block but NOT
when it is preceded by a normal (literal) left parenthesis.
Thanks,
Stephen Salisbury <address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Gnu SED inexplicably requires quoting of carat following plain left parenthesis,
Stephen Salisbury <=