(.^.)软件环境
- Ruby 1.8.6
- 有用的Windows命令工具集GnuWin32
(.^.)函数system
- Linux系统实例代码
system "rm /tmp/hello.txt"
- Windows实例代码
system "cmd /c del ./hello.txt"
system "calc" - 说明
在执行该函数system以后,程序会继续执行之后的代码。
(.^.)函数exec
- Linux系统实例代码
system "ls -al /tmp/hello.txt"
- Windows实例代码
system "ls -al ./hello.txt"
- 说明
在执行该函数exec以后,程序就停止执行之后的代码。
(.^.)函数·
- Windows和Linux系统实例代码
·ls -al .·
- 说明
函数·(重音符,在Tab键上面的按钮)能够让我们获得输出结果。
(.^.)函数%x
- Windows和Linux系统实例代码
%x(ls -al .)
- 说明
注意这里的括号不能省略。