Last active
December 16, 2015 05:08
-
-
Save SamSamskies/5381839 to your computer and use it in GitHub Desktop.
I created a ruby one liner to delete all blank lines from a text file and store each line in an array.
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
#returns an array filled with each non-blank line from the file as elements. | |
File.read(file).squeeze("\n").split("\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NICE!