Created
March 23, 2016 20:34
-
-
Save gelias/e75d7ce135114c52f918 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/bin/ruby | |
| full_filename = ARGV[0] | |
| text_to_search = ARGV[1] | |
| fileObj = File.new(full_filename, "r") | |
| while (line = fileObj.gets) | |
| if line.include? text_to_search | |
| puts(line) | |
| end | |
| end | |
| fileObj.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment