Skip to content

Instantly share code, notes, and snippets.

/.rb

Created August 5, 2015 10:01
Show Gist options
  • Save anonymous/7b0499540b0c05bbe4be to your computer and use it in GitHub Desktop.
Save anonymous/7b0499540b0c05bbe4be to your computer and use it in GitHub Desktop.
# why does this work
File.open( ("data/" + ("%06d" % file_number).to_s), "r+") do |file|
file_content = file.read
unless file_content == zabbix.templates_export[name]
puts file.path
puts file_content
end
end
# or more important why does this don't work?
File.open( ("data/" + ("%06d" % file_number).to_s), "r+") do |file|
unless file.read == zabbix.templates_export[name]
puts file.path
puts file.read
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment