I need a little help. I have a script for ruby:
outfile = ARGV.shift
lines = ARGF.readlines
marked_up_lines = lines.map do |line|
words = line.split
‘’ + words + ‘’ + “\n”
File.open(outfile,‘w’) do |file|
This script should split two words with special parameter (from a plain
text it makes xml source). That works so fine if I have ONLY two
columns, but if I put several lines in the txt file beginning it dies.
So, my only question is: how can I bring ruby that it should from line
nr. X (i.e. 6 or 7) begin? And another question: can ruby after the
conversion put in the file a line (ie. )?