Rails: Difference between revisions
From Kingside Wiki
(Created page with "== Run System Commands From Ruby == [https://www.rubyguides.com/2018/12/ruby-system/|Ruby Guides] ;[code]system[/code] : [code]system(“ls”)[/code] : ‘’’system’’’ will print the command output as it happens : <blockquote>’’’Note’’’ <code>system</code> will make your Ruby program ‘’’’’wait until the command is done’’’’’</blockquote>") |
|||
Line 2: | Line 2: | ||
[https://www.rubyguides.com/2018/12/ruby-system/|Ruby Guides] | [https://www.rubyguides.com/2018/12/ruby-system/|Ruby Guides] | ||
; | ;<code>system</code> | ||
: | : <code>system(“ls”)</code> | ||
: ‘’’system’’’ will print the command output as it happens | : ‘’’system’’’ will print the command output as it happens | ||
: <blockquote>’’’Note’’’ <code>system</code> will make your Ruby program ‘’’’’wait until the command is done’’’’’</blockquote> | : <blockquote>’’’Note’’’ <code>system</code> will make your Ruby program ‘’’’’wait until the command is done’’’’’</blockquote> |
Revision as of 17:26, 2 March 2023
Run System Commands From Ruby
system
system(“ls”)
- ‘’’system’’’ will print the command output as it happens
’’’Note’’’
system
will make your Ruby program ‘’’’’wait until the command is done’’’’’