[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNU sed version 4.2.1 bug?
From: |
Joshua Schriver |
Subject: |
GNU sed version 4.2.1 bug? |
Date: |
Wed, 6 Apr 2011 11:59:52 -0400 |
I have a line in a script:
sed -ire 's:([^\\]*)\\(.*):<\1 >\n\2\n</\1 >:g' tmpfile
That gives the following error:
sed: -e expression #1, char 36: invalid reference \2 on `s' command's RHS
When I'm using the -I option.
Changing the line to the following works without errors:
sed -re 's:([^\\]*)\\(.*):<\1 >\n\2\n</\1 >:g' tmpfile > tfile2
Why would the in-place option make or break the replacement expression?
Joshua Schriver
Electrical Engineer
Pitney Bowes - Document Messaging Technologies
(203) 739-2296
- GNU sed version 4.2.1 bug?,
Joshua Schriver <=