Skip to content

Instantly share code, notes, and snippets.

@taylortrimble
Created January 23, 2013 21:52
Show Gist options
  • Save taylortrimble/4614149 to your computer and use it in GitHub Desktop.
Save taylortrimble/4614149 to your computer and use it in GitHub Desktop.
I needed to put a leading backslash before spaces to make my shell happy, so I made this.
repos = File::open( "/Users/Trimble/Desktop/r", "r" ).read
output_file = File::open( "/Users/Trimble/Desktop/er.txt", "w" )
repos.each_line do |line|
output_file.puts line.gsub(' ', '\ ')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment