Created
          July 3, 2013 01:45 
        
      - 
      
- 
        Save tjsingleton/5914820 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
    
  
  
    
  | last_line = nil | |
| index = 0 | |
| ARGF.each_line do |line| | |
| index += 1 | |
| next if index < 35 | |
| puts last_line if last_line # skip last line | |
| line.gsub!("#{0x01}\\#{0x01}", "#{0x01}#{0x01}") | |
| line.gsub!("\\", "\\\\") | |
| line.tr!("\r", " ") | |
| line.tr!("\n", " ") | |
| line.gsub!("#{0x02} ", "#{0x02}") | |
| line.tr!("#{0x02}", "\n") | |
| last_line = line | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment