-
-
Save anonymous/4ab7572a24e7829120d1 to your computer and use it in GitHub Desktop.
Ruby the hard way executed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby test.rb foo.txt | |
First let's print the whole file: | |
foo | |
bar | |
baz | |
Now let's rewind, kind of like a tape. | |
Let's print three lines: | |
1, foo | |
2, bar | |
3, baz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment