Skip to content

Instantly share code, notes, and snippets.

@daerich
Created January 10, 2022 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daerich/515b6de52c8e5fa12ef7c37bdec10d80 to your computer and use it in GitHub Desktop.
Save daerich/515b6de52c8e5fa12ef7c37bdec10d80 to your computer and use it in GitHub Desktop.
replace incorrect temp degree values
#!/usr/bin/env ruby
ARGF.each {|line|
if line =~ /,[[:digit:]]{2,2}/
puts $` + ",#{$&[1,2].to_i - 10}" + $'
else
puts line
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment