Sha256: 36fd4b8a95a94f4ace5cda6fc7714beaa33d9e6a12df607e648e0def624f58a8

Contents?: true

Size: 332 Bytes

Versions: 26

Compression:

Stored size: 332 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'
require 'json'

regex = /#{ARGV[0]}/

STDIN.each_line do |line|
  if line =~ regex 
    object              = {}
    object['timestamp'] = Time.now.tv_sec
    object['line']      = line.chomp
    object['match']     = line.scan(regex) 
    puts object.to_json
    $stderr.puts "\a"
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ix-cli-0.0.27 bin/ix-bellgrep
ix-cli-0.0.26 bin/ix-bellgrep
ix-cli-0.0.25 bin/ix-bellgrep
ix-cli-0.0.24 bin/ix-bellgrep
ix-cli-0.0.23 bin/ix-bellgrep
ix-cli-0.0.22 bin/ix-bellgrep
ix-cli-0.0.21 bin/ix-bellgrep
ix-cli-0.0.20 bin/ix-bellgrep
ix-cli-0.0.19 bin/ix-bellgrep
ix-cli-0.0.18 bin/ix-bellgrep
ix-cli-0.0.17 bin/ix-bellgrep
ix-cli-0.0.16 bin/ix-bellgrep
ix-cli-0.0.15 bin/ix-bellgrep
ix-cli-0.0.14 bin/ix-bellgrep
ix-cli-0.0.13 bin/ix-bellgrep
ix-cli-0.0.12 bin/ix-bellgrep
ix-cli-0.0.11 bin/ix-bellgrep
ix-cli-0.0.10 bin/ix-bellgrep
ix-cli-0.0.9 bin/ix-bellgrep
ix-cli-0.0.7 bin/ix-bellgrep