ARGF doc top

Ruby code posted by Douglas Allen
created at 25 Aug 04:12, updated at 25 Aug 05:48

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# argf.rb

p ARGF.argv   
p option = ARGV.shift
p ARGF.argv
p ARGF.all?
p ARGF.any? 

$ ruby argf.rb --verbose file1 file2
["--verbose", "file1", "file2"]
"--verbose"
["file1", "file2"]
true
false
209 Bytes in 2 ms with coderay