From ab06b8474f477d82422ef067fd5c76012dc29110 Mon Sep 17 00:00:00 2001 From: Aaron Johnson Date: Mon, 16 Sep 2019 20:48:57 -0500 Subject: [PATCH] Fixed temperature input with newline characters --- run.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.rb b/run.rb index b1f3f93..35ba9be 100755 --- a/run.rb +++ b/run.rb @@ -199,7 +199,7 @@ def process_tdata(host, simple=false) print "Processing #{host}: " STDOUT.flush if system("nmap #{host} -p 22 2>&1 | grep 22 | grep open >/dev/null") - tdata = `ssh -oBatchMode=yes #{host} heatbot_gettemp` + tdata = `ssh -oBatchMode=yes #{host} heatbot_gettemp`.chomp #if tdata.is_integer? if tdata.is_float? tdf = tdata.to_f