From 592539d8e2050b66d0312e3c0d8fd9a72497fefa Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 24 Jun 2023 23:21:41 +0200 Subject: [PATCH] sys_interfaces_all miss place new line fixed --- etc/profile.d/sys.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 ""}\ +; ' } -- 2.47.3