From 03391538478e67c622b211a044236b066132f076 Mon Sep 17 00:00:00 2001 From: "Begerad, Stefan" Date: Mon, 28 Aug 2023 14:30:29 +0200 Subject: [PATCH] fix(bin): adjust dload.sh for file management --- bin/dload.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/dload.sh b/bin/dload.sh index edb0b76..d9dd1b1 100644 --- a/bin/dload.sh +++ b/bin/dload.sh @@ -35,20 +35,26 @@ csvFile=$(basename $csvFilePath) echo "csvFile: $csvFile" csvFileNoExt="${csvFile%.*}" echo "csvFileNoExt: $csvFileNoExt" +csvFileDot=${csvFileNoExt}-dot.csv +echo "csvFileDot: $csvFileDot" +csvFileDotPath=${unzipDir}/$csvFileDot +echo "csvFileDotPath: $csvFileDotPath" +sed 's/\([[:digit:]]\)\,\([[:digit:]]\)/\1.\2/g' $csvFilePath > $csvFileDotPath +rm $csvFilePath # -csvFileLower=${csvFileNoExt}-lower.csv +csvFileLower=${csvFileNoExt}-dot-lower.csv echo "csvFileLower: $csvFileLower" csvFileLowerPath=${unzipDir}/$csvFileLower echo "csvFileLowerPath: $csvFileLowerPath" -sed '1s/\(.*\)/\L\1/' $csvFilePath > $csvFileLowerPath -#TODO rm $csvFilePath +sed '1s/\(.*\)/\L\1/' $csvFileDotPath > $csvFileLowerPath +rm $csvFileDotPath # csvFileComma=${csvFileNoExt}-dot-lower-comma.csv echo "csvFileComma: $csvFileComma" csvFileCommaPath=${unzipDir}/$csvFileComma echo "csvFileCommaPath: $csvFileCommaPath" sed -E 's/(");(")/\1\,\2/g' $csvFileLowerPath > $csvFileCommaPath -#TODO rm $csvFileLowerPath +rm $csvFileLowerPath # ZHV_CSV_OUTPUT="$3" echo "ZHV_CSV_OUTPUT: $ZHV_CSV_OUTPUT"