Skip to content
Snippets Groups Projects
Commit c7ee092c authored by Cristian Weiland's avatar Cristian Weiland
Browse files

Issue #53: Fix bug that got the wrong column number in resume_register.sh

parent 6e3e0468
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ index="servidores" ...@@ -8,7 +8,7 @@ index="servidores"
# ColumnName: The name of the column from the CSV that we will use to filter data. # 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. # 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. # The value should be the same as in the CSV, since it will be used to match data.
......
...@@ -16,7 +16,6 @@ output="${path}/${date}_Cadastro_Unique.csv" ...@@ -16,7 +16,6 @@ output="${path}/${date}_Cadastro_Unique.csv"
head -n1 ${input} > $path/header.csv head -n1 ${input} > $path/header.csv
iconv -f WINDOWS-1252 -t UTF-8 -o $path/tmp.csv $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=$(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 rm -f $path/tmp.csv $path/header.csv
cmd="\$$columnId == \"${filter}\"" cmd="\$$columnId == \"${filter}\""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment