Subject: [PATCH 2/2] checkbashisms: fix FP on $_ check when it is preceded by a backslash

From: Raphael Geissert <[email-masked]>
Date: Sun, 24 Feb 2013 12:48:14 +0100

Signed-off-by: Raphael Geissert <[email-masked]>
---
 scripts/checkbashisms.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkbashisms.pl b/scripts/checkbashisms.pl
index fd0b1be..44369d4 100755
--- a/scripts/checkbashisms.pl
+++ b/scripts/checkbashisms.pl
@@ -672,7 +672,7 @@ sub init_hashes {
 	qr'(?:^|\s+)TMOUT='           => q<TMOUT=>,
 	qr'\$\{?TIMEFORMAT\}?\b'      => q<$TIMEFORMAT>,
 	qr'(?:^|\s+)TIMEFORMAT='      => q<TIMEFORMAT=>,
-	qr'(?<!\$)\$\{?_\}?\b'	      => q<$_>,
+	qr'(?<![$\\])\$\{?_\}?\b'     => q<$_>,
 	qr'(?:^|\s+)GLOBIGNORE='      => q<GLOBIGNORE=>,
 	qr'<<<'                       => q<\<\<\< here string>,
 	$LEADIN . qr'echo\s+(?:-[^e\s]+\s+)?\"[^\"]*(\\[abcEfnrtv0])+.*?[\"]' => q<unsafe echo with backslash>,
-- 
1.7.10