R
Reid Thompson
Given a pipe '|' delimited file ala:
rthompso@jhereg:~$ cat pipedata
A|This is text|Is this supposed to error|
A|This is text|Is this supposed to error|
A|This is text|Is this supposed to error|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
and scripting ala:
rthompso@jhereg:~$ cat pipedata.rb
require 'rubygems'
require 'faster_csv'
FasterCSV.foreach("/home/rthompso/pipedata", :col_sep => '|') do |row|
# use row here...
next if row.empty?
puts row
end
Why are rows that contain quoted data deemed MalFormed?
rthompso@jhereg:~$ cat pipedata
A|This is text|Is this supposed to error|
A|This is text|Is this supposed to error|
A|This is text|Is this supposed to error|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
A|This is text|Is this supposed to "error"|
and scripting ala:
rthompso@jhereg:~$ cat pipedata.rb
require 'rubygems'
require 'faster_csv'
FasterCSV.foreach("/home/rthompso/pipedata", :col_sep => '|') do |row|
# use row here...
next if row.empty?
puts row
end
Why are rows that contain quoted data deemed MalFormed?