From c7ee092c024a73574fb40dbef529bafd22239686 Mon Sep 17 00:00:00 2001
From: Cristian Weiland <cw14@inf.ufpr.br>
Date: Fri, 5 May 2017 11:31:41 -0300
Subject: [PATCH] Issue #53: Fix bug that got the wrong column number in
 resume_register.sh

Signed-off-by: Cristian Weiland <cw14@inf.ufpr.br>
---
 scripts/workers/config.sh.example  | 2 +-
 scripts/workers/resume_register.sh | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/scripts/workers/config.sh.example b/scripts/workers/config.sh.example
index 1b6efe1..7576a10 100644
--- a/scripts/workers/config.sh.example
+++ b/scripts/workers/config.sh.example
@@ -8,7 +8,7 @@ index="servidores"
 
 # ColumnName: The name of the column from the CSV that we will use to filter data.
 
-columnName="ORGSUP_LOTACAO"
+columnName="COD_ORGSUP_EXERCICIO"
 
 # Filter: An associative array that will be used to filter data. The key should be the initials, and they will be used to generate the index name.
 # The value should be the same as in the CSV, since it will be used to match data.
diff --git a/scripts/workers/resume_register.sh b/scripts/workers/resume_register.sh
index 270c831..d4d99f1 100755
--- a/scripts/workers/resume_register.sh
+++ b/scripts/workers/resume_register.sh
@@ -16,7 +16,6 @@ output="${path}/${date}_Cadastro_Unique.csv"
 head -n1 ${input} > $path/header.csv
 iconv -f WINDOWS-1252 -t UTF-8 -o $path/tmp.csv $path/header.csv
 columnId=$(sed s/${4}.*$/${4}/ $path/tmp.csv | sed -e 's/\t/\n/g' | wc -l)
-columnId=`expr $columnId + 1`
 rm -f $path/tmp.csv $path/header.csv
 
 cmd="\$$columnId == \"${filter}\""
-- 
GitLab