Created
September 25, 2013 09:06
-
-
Save hachy/6697003 to your computer and use it in GitHub Desktop.
ruby space_squeeze.rb file1.txt > file2.txt
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
ARGF.each_line do |line| | |
puts line.gsub(/[ ]+/, ' ').rstrip | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment