summaryrefslogtreecommitdiff
path: root/get-temps.rb.bak
diff options
context:
space:
mode:
Diffstat (limited to 'get-temps.rb.bak')
-rwxr-xr-xget-temps.rb.bak16
1 files changed, 16 insertions, 0 deletions
diff --git a/get-temps.rb.bak b/get-temps.rb.bak
new file mode 100755
index 0000000..ac24051
--- /dev/null
+++ b/get-temps.rb.bak
@@ -0,0 +1,16 @@
+#!/usr/bin/env ruby
+
+while line = STDIN.gets
+ a = line.split
+ d = {}
+ a.each { |i|
+ name, val = i.split("::")
+ if name == "temperature"
+ d["temperature"] = val
+ end
+ if name == "device_id"
+ d["dev"] = val
+ end
+ }
+ puts d.to_s
+end