From: Nicolas Boisselier Date: Sat, 24 Jun 2023 21:21:41 +0000 (+0200) Subject: sys_interfaces_all miss place new line fixed X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=592539d8e2050b66d0312e3c0d8fd9a72497fefa;p=nb.git sys_interfaces_all miss place new line fixed --- diff --git a/etc/profile.d/sys.sh b/etc/profile.d/sys.sh index 98344cc8..25cba22d 100644 --- a/etc/profile.d/sys.sh +++ b/etc/profile.d/sys.sh @@ -195,13 +195,12 @@ sys_interfaces_all() { BEGIN{i=0; j=0}\ /"link_type":"loopback"/{next}\ /"info_kind":"veth"/{next}\ -0{print $0; next} -i!=j{print ""}\ /"ifname":/{i++}\ match($0, /"ifname":"([^"]+)"/, m) {printf "%s\t", m[1]}\ match($0, /"address":"([^"]+)"/, m) {printf "%s\t", m[1]}\ match($0, /"local":"([0-9\.]+)"/, m) {printf "%s", m[1]}\ -0{print "";print i} +i!=0{print ""}\ +; ' }