What does this line in Ruby : Input_file = ARGV.first mean ?
How does it work? Can give an example ? HELP , HELP .....
W dniu 2016-04-19 o 12:02, Cai Gengyang pisze:
What does this line in Ruby : Input_file = ARGV.first mean ?
How does it work? Can give an example ? HELP , HELP .....
$ cat argv.rb
#!/usr/bin/env ruby
puts ARGV.inspect
$ ruby argv.rb hard to say
["hard", "to", "say"]
Oh ok, so for the question in the study drill --- "Write English comments for each line to understand what that line does." , what should I write beside the line Input_file = ARGV.first ?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 493 |
Nodes: | 16 (3 / 13) |
Uptime: | 170:37:04 |
Calls: | 9,704 |
Calls today: | 4 |
Files: | 13,736 |
Messages: | 6,178,355 |