This is a task I wrote the takes the output from pgrep and checks for
running process... This is one way of capturing the output from a
command...

desc "Start the Tomcat process"
task :start, :roles => :app do
  run "pgrep jsvc|wc -l" do |ch, stream, out|
  if out.to_i==0
    run "/etc/init.d/tomcat start"
  end
end


On Sep 6, 3:20 pm, Tim <[EMAIL PROTECTED]> wrote:
> Say i have a custom task that executes an 'svn info' on the current
> app dir.  I want to be able to capture the result, then parse it for
> specific info.  Anyone have a handy way to capture the command line
> into a variable so that it can be evaluated.  I see the webistrano
> scheme, but that writes to a db object for every line of output.  Do I
> have to collect the output line by line, or is there some way to just
> capture all of it?


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to