Sha256: 5e38b85ccbc0f10777b3489ecd82814036f2f121eb07e7b025459417af53277b
Contents?: true
Size: 452 Bytes
Versions: 8
Compression:
Stored size: 452 Bytes
Contents
Capistrano::Configuration.instance.load do set(:pattern, '') set(:all_logs, false) namespace :syslog do desc "Grep the sys" task :grep do syslogs_name = if all_logs '/var/log/syslog*' else '/var/log/syslog' end if pattern.to_s.strip != '' sudo "zgrep -E #{pattern} #{syslogs_name}" else fail "No pattern specified, please use -s pattern=PATTERN" end end end end
Version data entries
8 entries across 8 versions & 1 rubygems