tags:

views:

23

answers:

1

I have an input file I want to load into a MySQL database, but spread throughout the file are comment lines, which start with !. For example,

!dataset_value_type = count

The other lines that I want to read into the table are normal, without the leading !.

What is the import command to ignore lines that start with !? I just see commands to ONLY take lines that start with something (LINES STARTING BY)

A: 

Ouch! I think you will need to pre-process your data file. Something like:

perl -pi.bak -e 's/^!.*$//;'  data-file.dat
Martin