开发者

Mock Terminal Console/Live Command Updates in Ruby on Rails

开发者 https://www.devze.com 2022-12-25 17:08 出处:网络
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

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

精彩评论

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

关注公众号