alexh-name / bme680_outputs

This script checks a CSV of BSEC data from the BME680 sensor periodically for some significant change and gives feedback in form of a sentence, which can be useful for automatic notifications.
MIT License
12 stars 0 forks source link

STATUS_ARR[0]=0: not found #1

Closed ferazambuja closed 6 years ago

ferazambuja commented 6 years ago

Hi, I'm getting STATUS_ARR[0]=0: not found when I try to run ./prettyBSEC.sh. I'm using ./bsec_bme680 | tee -a ./log.csv to run the bme680. I also placed the script on the same folder. Any idea what I'm getting wrong?

Best

alexh-name commented 6 years ago

I forgot that arrays aren't part of POSIX shells. If you have bash on your system, you could just invoke the script with bash ./prettyBSEC.sh or replace the shebang !#/bin/sh with !#/bin/bash, until I rewrite the script to be POSIX compliant.

alexh-name commented 6 years ago

I decided not to drop the arrays yet, so if the /bin/sh on your system (as it is on raspbian) does not have them, use ksh/mksh/bash instead. 8baed145ca756e0fe5b66532c4f9c3afd574fb4a

ferazambuja commented 6 years ago

Thanks, it did work using !#/bin/bash ./prettyBSEC.sh

I had to install bc.