!Mac OS X-10.15.7!ruby-2.7.1p83
print("hello world")
Execution result
$ruby print.rb
hello world
No line breaks There are various other Ruby output methods It is posted in Command Summary
ARGV(argument vector)
puts "hello #{ARGV[0]}"
Coding with
$ ruby hello_name.rb Cyoukou
Then
hello Cyoukou
Is output Get the string entered with puts and attach it after Hello Other input methods are listed in Command Summary
Recommended Posts