Archive for the 'Posts' Category

More variable problems

Wednesday, January 17th, 2007

I was actually going to do a test run today with everything running, but the first time the program tried to upload the data to the webserver, I started getting corrupt output. As that data is getting written out to the log file, the datetime stamp is getting inserted into the middle of the data variable. So a full test will be delayed until tonight or tommorow.

Awk saves the day

Tuesday, January 16th, 2007

Solved a minor script problem by using awk. I needed the script that uploads the sensor data to the website to keep trying until the data was uploaded and processed. I was having trouble comparing variables because /bin/sh treated spaces as a field separator. I used awk to seperate the fields using a ‘;’. This allowed me to compare the data fields instead of the entire line.