module Kernel
alias_method :real_backticks, :'`'
def `(cmd)
puts "`#{cmd}` => #{output = real_backticks(cmd)}"
output
end
end
Showing posts with label ruby backticks debugging. Show all posts
Showing posts with label ruby backticks debugging. Show all posts
Wednesday, May 21, 2008
Ruby: Debugging backticks
I needed to knock up a Ruby script recently that orchestrated some external processes using backticks. However something was going wrong and I need to temporarily peek into the inputs and outputs of the external programs. Ruby bend-ability to the rescue:
Subscribe to:
Posts (Atom)