Skip to content

Instantly share code, notes, and snippets.

@chtz
Created March 16, 2016 10:26
Show Gist options
  • Save chtz/0c90767c232363fd1fba to your computer and use it in GitHub Desktop.
Save chtz/0c90767c232363fd1fba to your computer and use it in GitHub Desktop.
Convert log to sql (ruby unix-style filter sample)
while line = gets
if line =~ /.*externalId\=(.*)\, id=(.*)/
puts "update fnmig.cormig set currentdocumentid='#{$2}', status='manual-delete' where externalid='#{$1}';"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment