From 4a90dac68e971b02ce3394bfc85fcd0933bd7d05 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 7 Sep 2017 19:42:00 +0200 Subject: [PATCH] Simplify awk code as the format of ipp.txt is actually fixed (only one entry per line is allowed) Signed-off-by: DL6ER --- gravity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 78b7ebb6..5519d11a 100755 --- a/gravity.sh +++ b/gravity.sh @@ -341,7 +341,7 @@ gravity_hostFormatLocal() { # Generate local HOSTS list with information obtained from OpenVPN (if available) if [[ -f ${VPNList} ]]; then - awk -F, '{for (i=NF; i>=1; i-=2) printf $i"\t"$(i-1) "\n" }' "${VPNList}" >> "${localList}" + awk -F, '{printf $2"\t"$1"\n"}' "${VPNList}" >> "${localList}" fi }