Ruby/Development/system
Материал из Wiki.crossplatform.ru
Содержание |
Create a zero-length file with a system command
system("touch chap.txt") #
Getting Results from Other Programs
x = system("date") x = "date"
run an operating system command with system:
system "echo "Hello, Matz!""
Run notepad.exe with system function
system("notepad.exe","myfile.txt") # No problem...
submit each part of a command separately, as an argument to system:
system "echo", "Hello,", "Matz!"