Ruby里ARGF可以将多个文件的内容合并成一个String

puts ARGF.read // test.rb

运行ruby test.rb a.txt b.txt后, a.txt和b.txt之中会被合并。

 

 

更详细的讲解可以看考: http://ruby.about.com/od/tasks/ss/Argf-A-Shortcut-For-Scripts.htm

相关文章:

  • 2021-07-19
  • 2021-07-14
  • 2021-06-13
  • 2021-11-13
  • 2022-01-06
  • 2021-06-27
  • 2021-10-13
猜你喜欢
  • 2022-03-03
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
相关资源
相似解决方案