Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.