Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/common Escape { and } in the regexp that matches e.g...
details: https://anonhg.NetBSD.org/src/rev/400f9c5be22f
branches: trunk
changeset: 536416:400f9c5be22f
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Sep 15 16:15:40 2002 +0000
description:
Escape { and } in the regexp that matches e.g. ${FOO}.
diffstat:
distrib/common/parselist.awk | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (27 lines):
diff -r 808bfea17b1d -r 400f9c5be22f distrib/common/parselist.awk
--- a/distrib/common/parselist.awk Sun Sep 15 16:01:17 2002 +0000
+++ b/distrib/common/parselist.awk Sun Sep 15 16:15:40 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: parselist.awk,v 1.12 2002/08/18 14:03:42 lukem Exp $
+# $NetBSD: parselist.awk,v 1.13 2002/09/15 16:15:40 thorpej Exp $
#
# Copyright (c) 2002 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -156,14 +156,14 @@
# replace ${FOO} with ENVIRON["FOO"]
#
-/\${[A-Za-z0-9_]+}/ \
+/\$\{[A-Za-z0-9_]+\}/ \
{
- while (match($0, /\${[A-Za-z0-9_]+}/) > 0) {
+ while (match($0, /\$\{[A-Za-z0-9_]+\}/) > 0) {
v = substr($0, RSTART + 2, RLENGTH - 3);
if (! (v in ENVIRON))
err("Variable " v " is not in the environment");
else
- sub(/\${[A-Za-z0-9_]+}/, ENVIRON[v]);
+ sub(/\$\{[A-Za-z0-9_]+\}/, ENVIRON[v]);
}
}
Home |
Main Index |
Thread Index |
Old Index