diff options
author | John Denker <jsd@av8n.com> | 2020-09-17 22:23:06 -0700 |
---|---|---|
committer | John Denker <jsd@av8n.com> | 2020-09-17 22:23:06 -0700 |
commit | a15addd52c186bada8e2685757ae9395ac9a9dcc (patch) | |
tree | 0a49b7f5e0d82388947053b5ab5d0e4aaa1d284f /csv-sql | |
parent | a18bec81c6f0e16aed6886257e80a0b5bacc3ed6 (diff) |
Diffstat (limited to 'csv-sql')
-rwxr-xr-x | csv-sql | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -12,7 +12,7 @@ Features include: type it requires. -- We allow multi-line headers. -- Flexible scheme for marking the end of the header. --- Field lines can come from any line in the header +-- Field names can come from any line in the header (not necessarily the first line). Usage: @@ -34,9 +34,10 @@ Work that you need to do once: create database $dbname; grant all privileges on $dbname.* to $LOGNAME@localhost; flush privileges; +where $dbname is some database that can hold the table we create. Work that you need to do once per update: -mysql --defaults-extra-file=$HOME/misc/mysql.polling.conf +mysql --defaults-extra-file=$HOME/misc/mysql.$dbname.conf source $whatever.sql EoF } @@ -170,7 +171,9 @@ main: { elsif (check '-debug', 1) { my $topic = shift @ARGV; if (! exists $topics->{$topic}) { - print STDERR "Unknown topic '$topic'\n" if $topic ne 'topics'; + if ($topic ne 'topics' && $topic !~ m'^[?]') { + print STDERR "Unknown topic '$topic'\n" + } print STDERR "Available topics are:\n"; for my $top (sort keys %$topics) { print STDERR " $top\n"; |