Gentoo Archives: gentoo-dev

From: David Leverton <levertond@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] escaping variables in sed expressions
Date: Tue, 15 Apr 2008 11:30:00
Message-Id: 200804151229.47173.levertond@googlemail.com
In Reply to: [gentoo-dev] escaping variables in sed expressions by "Marijn Schouten (hkBst)"
1 On Tuesday 15 April 2008 12:14:57 Marijn Schouten (hkBst) wrote:
2 > There are several option to handle this. I could use a less common
3 > delimiter or I could escape it: ${D//_/\_} instead of ${D}. I could use a
4 > sed expression that doesn't suffer from this problem (thanks to dleverton):
5 >
6 > sed -ne '\_^prefix = /usr/local_!{p;d}' -e "iprefix = ${D}" -i Makefile
7
8 Just to clarify, I didn't think of escaping when I suggested this. Escaping
9 is probably cleaner, and certainly easier to understand.
10 --
11 gentoo-dev@l.g.o mailing list