Spool output of shell commands

17 views
Skip to first unread message

rellim4lla

unread,
Nov 3, 2010, 5:18:44 AM11/3/10
to babushka_app
Hi

Can you spool the output of a shell command to the console so the end
user can see what is happening? I am currently doing this for long
processes...

log_block "doing a long shell command" do
shell "xxxxxx"
end

For long processes that are internally providing feedback I would like
to pass this onto the console the dep was launched from.

Cheers

Ben Hoskings

unread,
Nov 3, 2010, 7:04:18 PM11/3/10
to babush...@googlegroups.com
Yep:

shell "blah", :log => true

Should do the trick.

Also, there's a shorthand for the case you're using, where you have a shell call within a log_block, e.g.

log_shell "running the spec suite", "rake spec"

That results in "running the spec suite... done.", so it's not intended for showing the output of the shell command.

Ben

Sent from my iPad

> --
> To post, email babush...@googlegroups.com
> To unsubscribe, email babushka_app...@googlegroups.com
> ~
> http://babushka.me
> http://github.com/benhoskings/babushka
> http://groups.google.com/group/babushka_app

rellim4lla

unread,
Nov 4, 2010, 2:00:46 AM11/4/10
to babushka_app
Sweet thanks Ben

On Nov 4, 1:04 am, Ben Hoskings <b...@hoskings.net> wrote:
> Yep:
>
> shell "blah", :log => true
>
> Should do the trick.
>
> Also, there's a shorthand for the case you're using, where you have a shell call within a log_block, e.g.
>
> log_shell "running the spec suite", "rake spec"
>
> That results in "running the spec suite... done.", so it's not intended for showing the output of the shell command.
>
> Ben
>
> Sent from my iPad
>
Reply all
Reply to author
Forward
0 new messages