开发者

Mock Terminal Console/Live Command Updates in Ruby on Rails

In my app, a user can run a script, and if it is run in the terminal, it shows a nice progress bar, how would I replicate thi开发者_JAVA技巧s in rails? I mean I could do like something between the two to communicate, but I would prefer if it would just show a "live" shell output.

Thanks :)


If your script is invoked with 2>&1 at the end, backticks invocation will return STDOUT & STDERR.

result = ‘ls 2>&1‘

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜