#!/usr/bin/env ruby ################### espclient -- brent@mbari.org #################### # Copyright (C) 2017 MBARI # MBARI Proprietary Information. All rights reserved. # # Strip all timestamps from ASCII ESP log # ####################################################################### require 'getoptlong' opts = GetoptLong.new( ["--help", "-h", GetoptLong::NO_ARGUMENT] ) ProgName = File.basename $0 opts.each do |opt, arg| case opt when "--help" STDERR.puts <<-END Strip all timestamps from ASCII ESP logs in STDIN -- 1/24/17 brent@mbari.org Options: --help #displays this text END exit 2 end end stamp=/^@\S+\s+/ until STDIN.eof? do puts gets.chomp.sub(stamp, '') end