Shell script: expected timestamp not found

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Shell script: expected timestamp not found

spock
This post has NOT been accepted by the mailing list yet.
Hi,

I am playing around with a shell script running on a Raspberry Pi.

I defined a timestamp and some values within the variable rrd_string.
When running the rddtool update function, the rddtool does not seem to identify the timestamp "20140601 00:00"....

root@raspberrypi:/production# echo $rrd_string
"20140601 00:00"@35.4:13.1:U:U:U
root@raspberrypi:/production# rrdtool update temp_pool.rrd $rrd_string
ERROR: temp_pool.rrd: expected timestamp not found in data source from "20140601
root@raspberrypi:/production# `rrdtool update temp_pool.rrd $rrd_string`
ERROR: temp_pool.rrd: expected timestamp not found in data source from "20140601

However, if I manually call the command in the shell:
root@raspberrypi:/production# rrdtool update temp_pool.rrd "20140601 00:00"@35.4:13.1:U:U:U
root@raspberrypi:/production#

It updates just fine, no error message here.
When using the variable, the "space" after the date 20140601 seems to be a delimiter, rrdtool does not recognize anything beyond that.

I am sure this has something to do with standard unix shell programming.

Can anyone help here?

Regards,
Spock