在 OSX 和 Windows 上从 Ruby 运行任意系统命令
我想从 ruby 脚本打开 OSX 窗口(和 Windows 窗口)。 如果我
system "touch /Users/apple/Documents/thekbase-temp-files/test5.txt"
这样做,它会起作用(创建一个空文件),但这
system "mate /Users/apple/Documents/thekbase-temp-files/test5.txt"
不会打开 TextMate,即使我键入它会打开 TextMate。 我觉得这可能是这个问题的版本,但我只想为了确定。
谢谢!
I would like to open OSX windows (and Windows windows) from a ruby script. If I do
system "touch /Users/apple/Documents/thekbase-temp-files/test5.txt"
it works (creates an empty file), but this
system "mate /Users/apple/Documents/thekbase-temp-files/test5.txt"
does not open TextMate, even though it does if I type it. I feel this might be a version of this question but I just want to be sure.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
Try