Explorar o código

Merge pull request #1669 from micmac1/master-jsonrpc-portable

kamctl: make jsonrpc filter portable
Daniel-Constantin Mierla %!s(int64=7) %!d(string=hai) anos
pai
achega
2db33ab334
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      utils/kamctl/kamctl.base

+ 1 - 1
utils/kamctl/kamctl.base

@@ -715,7 +715,7 @@ filter_json()
 	$AWK 'function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s }
 		BEGIN { line=0; IGNORECASE=1; }
 		{ line++; }
-		NR == 1 && /^{.+"id"[ \t]*:[ \t]*[0-9]+[ \t]*}$/ { print; next; }
+		NR == 1 && /^[{].+"id"[ \t]*:[ \t]*[0-9]+[ \t]*}$/ { print; next; }
 		NR == 1 && /^200 OK/ { next; }
 		/^[ \t]*"jsonrpc":[ \t]*"2.0"/ { print; next; }
 		/^[ \t]*"result":[ \t]*\[.+/ {