Skip to content

Instantly share code, notes, and snippets.

@jwarchol
Created January 29, 2010 15:36
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 jwarchol/289811 to your computer and use it in GitHub Desktop.
Save jwarchol/289811 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
cnt = 0
loop do
puts "loop"
line = STDIN.readline
if line =~ Regexp.new(ARGV[0])
puts "\tmatch"
File.open("install-#{cnt}.txt", "w") {|f| f.write Time.now.to_s}
cnt += 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment