Background information: Data exchange via csv between 2 programs.
I have the following csv from program 1:
> timestamp; name ; value > 1655709562;Var 1 Float;65.0 > 1655709562;Var 2 Float;3.32 > 1655709562;Var 1 Integer;**2** > 1655709562;Var 2 Integer;**564**
For program 2 I have to convert it to the following, because it always expects the same datentype at "value":
timestamp; name ; value 1655709562;Var 1 Float;65.0 1655709562;Var 2 Float;3.32 1655709562;Var 1 Integer;**2.0** 1655709562;Var 2 Integer;**564.0**
I'll try to show it with a for loop and an if function, because I think that's the best way to show it.
for $line in $file
do
If $line contains NOT "."
then
add ".0" at the end of line
end_if
done
***
are not part of your file, please remove them. Also, do you just need to change the number, or do you also need to change the type (Integer
=>Float
)?