Script based data evaluation and put back to db

Hi,
I’m logging data via IObroker into influxdb on a raspberry pi. Now I would like to do some evaluation of the recorded data and store those computed values back into the DB. As far as I’m aware, there are many ways to do this: blockly, java script, task with FluxQL, cronjob …

My first attempt was to create a bash script with cli commands and create a cronjob in the rasberry OS. But when the script runs the command “influx …” the prompt changes to influx cli in the bash and the script stops. I there a possibility to pass the other commands to the cli?
thanks

Hello @FrankiT,
What’s your script?
What version of InfluxDB.
But also I believe you can use echo and pipe

echo "SELECT * FROM your_measurement" | influx -database 'your_db' -execute