sh“
但是,sh只是似乎返回true,而不是包含whoami命令的输出的字符串.有人知道解决方案吗?
output = `whoami` #or output = %x[whoami] # or using 'system' but in case of errors it's gonna return false output = system "whoami"