标签: ruby mruby
在mruby中,如何使用%x(),``或system运行shell命令? 我可以使用它吗?
%x()
``
system
答案 0 :(得分:1)
尝试执行mruby-io的{{1}}: https://github.com/iij/mruby-io/blob/728d313b2c238ac0f41a4aa7e4a88e6a8fee8079/mrblib/kernel.rb#L2-L4
mruby-io
或键入popen,其中mruby-process:https://github.com/iij/mruby-process/blob/c31010dc0440335a7693fd70ae005c79bd1378ec/src/process.c#L368
popen
mruby-process