From 8649fcf02ad0646ebbf2daea2ededd0ee4a5745a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 21 Nov 2017 14:54:54 +0100 Subject: [PATCH] contrib: use less in NM-log to pre-process input GNU less supports filters. That makes it nice to use instead of cat. Also, less is well suited for output to a pipe. With this, `NM-log nm-log.txt.gz` works as you would expect --- contrib/scripts/NM-log | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/scripts/NM-log b/contrib/scripts/NM-log index 4ef02c724a..5e78c41fb1 100755 --- a/contrib/scripts/NM-log +++ b/contrib/scripts/NM-log @@ -38,7 +38,7 @@ NM-colorize() { GREP_COLOR='01;31' grep -a --color=always '^\|^\(.* \)\?<\(warn> \|error>\) \[[0-9.]*\]' | \ GREP_COLOR='01;33' grep -a --color=always '^\|^\(.* \)\? \[[0-9.]*\]\( .*\.*$\)\?' | \ GREP_COLOR='01;37' grep -a --color=always '^\|\