Commit c7ee092c authored by Cristian Weiland's avatar Cristian Weiland

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

Signed-off-by: Cristian Weiland's avatarCristian Weiland <>
parent 6e3e0468
......@@ -8,7 +8,7 @@ index="servidores"
# ColumnName: The name of the column from the CSV that we will use to filter data.
# 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.
......@@ -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}\""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment