- https://dev.to/lofiandcode/ruby-puts-vs-print-vs-p-vs-pp-vs-awesome-5akl
- https://www.rubyguides.com/2018/10/puts-vs-print
ruby ex13.rb 12 17 29
ruby ex16.rb test.txt
- https://thoughtbot.com/blog/io-in-ruby#the-io-class
- https://thoughtbot.com/blog/io-in-ruby#file
- https://rubyapi.org/3.1/o/file#method-c-truncate
- https://rubyapi.org/3.1/o/io#method-i-seek
- https://stackoverflow.com/questions/27977368/seek-to-0-or-use-rewind-method
echo "This is a test file." > test.txt
ruby ex17.rb test.txt new_file.txt
- https://rubyapi.org/3.1/o/file#method-c-exist-3F
- https://stackoverflow.com/questions/8590098/how-to-check-for-file-existence
- https://www.justinweiss.com/articles/fun-with-keyword-arguments
- https://github.com/JuanitoFatas/what-do-you-call-this-in-ruby
ruby ex20.rb test.txt
ri File#seek