1234567891011121314151617181920 |
- #!/usr/bin/ruby
- # Show the unique lines from file 1 that do not exist in file 2.
- var file1 = File(ARGV[0])
- var file2 = File(ARGV[1])
- func collect_lines(fh) {
- var list = Set()
- fh.each {|line|
- #list << line.words.last
- list << line
- }
- list
- }
- collect_lines(file1.open_r) - collect_lines(file2.open_r) -> each {|line|
- say line
- }
|