about summary refs log tree commit diff
path: root/xlint
diff options
context:
space:
mode:
Diffstat (limited to 'xlint')
-rwxr-xr-xxlint9
1 files changed, 6 insertions, 3 deletions
diff --git a/xlint b/xlint
index 191d51e..422e367 100755
--- a/xlint
+++ b/xlint
@@ -7,9 +7,12 @@ export LC_ALL=C
 
 scan() {
 	local rx="$1" msg="$2"
-	grep -P -Hn -e "$rx" "$template" |
-		grep -v -P -e "[^:]*:[^:]*:\s*#" |
-		sed "s/^[^:]*:\([^:]*\):\(.*\)/$argument:\1: $msg/"
+	grep -P -hn -e "$rx" "$template" |
+		grep -v -P -e "[^:]*:\s*#" |
+		sed "s/^\([^:]*\):\(.*\)/\1: $msg/" |
+		while read line; do
+			echo "$argument:$line"
+		done
 }
 
 once() {