From 8fcc84b9b516bab357ca86a1ae26a5ce7ea39e28 Mon Sep 17 00:00:00 2001 From: Marc Schoechlin Date: Tue, 10 Sep 2013 13:24:08 +0200 Subject: [PATCH] Minor change to prevent problems with bash debug mode --- scriptreplay | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scriptreplay b/scriptreplay index 314a116..3d551b8 100755 --- a/scriptreplay +++ b/scriptreplay @@ -105,7 +105,13 @@ sub main() { if ($time_file) { my $timing_line = ; last REPLAY unless defined $timing_line; - last REPLAY unless $timing_line =~ /([.\d]+)\s+(\d+)/; + # Skip this line if this line contains shell tracing information + next REPLAY if $timing_line =~ /^\+\+/; + # This line doesn't seem to a valid timing, somthing is wrong here + if ($timing_line !~ /([.\d]+)\s+(\d+)/){ + print "ERROR: malformed timing line '".$timing_line."'\n"; + last REPLAY + } ($delay, $blocksize) = ($1, $2); }