From bed4f6a720db164326eb958d03fc487ac81e732a Mon Sep 17 00:00:00 2001 From: Justin Davis Date: Fri, 25 May 2012 12:59:17 -0400 Subject: Print custom variables at the end of the fields list. --- bin/pbfields | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/pbfields b/bin/pbfields index 9846aab..a27948a 100755 --- a/bin/pbfields +++ b/bin/pbfields @@ -59,10 +59,7 @@ END { } OFS = "="; ORS = "\n"; - for(i = 1; i <= customlen; i++){ - v = customvars[i] - print "_" v, unk[v] - } + for(i=1; i<=max; i++){ name = fields[i] if(!(name in output)){ @@ -75,6 +72,11 @@ END { print name, output[name] } } + + for(i = 1; i <= customlen; i++){ + v = customvars[i] + print "_" v, unk[v] + } } function wraparray (indent) -- cgit v1.2.3-24-g4f1b