Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/miniroot Appease awk warnings on suppressing dmesg t...



details:   https://anonhg.NetBSD.org/src/rev/97f0e0ab8330
branches:  trunk
changeset: 957616:97f0e0ab8330
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Dec 05 18:29:50 2020 +0000

description:
Appease awk warnings on suppressing dmesg timestamps.

> awk: warning: escape sequence `\[' treated as plain `['
>  source line number 1
>  context is
>         { h=$0; >>>  gsub("^[ <<<
> awk: warning: escape sequence `\]' treated as plain `]'
>  source line number 1

Should be pulled up to netbsd-9.

diffstat:

 distrib/miniroot/install.sub |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 9b8f4a862121 -r 97f0e0ab8330 distrib/miniroot/install.sub
--- a/distrib/miniroot/install.sub      Sat Dec 05 18:27:39 2020 +0000
+++ b/distrib/miniroot/install.sub      Sat Dec 05 18:29:50 2020 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-#      $NetBSD: install.sub,v 1.54 2020/12/05 18:24:10 tsutsui Exp $
+#      $NetBSD: install.sub,v 1.55 2020/12/05 18:29:50 tsutsui Exp $
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1611,6 +1611,6 @@
 
 mi_filter_dmesg() {
        # Remove timestemps, sort.
-       dmesg | awk '{ h=$0; gsub("^\[[0-9. ]*\] ", "", h); print h; }' \
+       dmesg | awk '{ h=$0; gsub("^[[0-9. ]*] ", "", h); print h; }' \
            | sort -u
 }



Home | Main Index | Thread Index | Old Index