summaryrefslogtreecommitdiff
path: root/csv-sql
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2020-09-17 22:23:06 -0700
committerJohn Denker <jsd@av8n.com>2020-09-17 22:23:06 -0700
commita15addd52c186bada8e2685757ae9395ac9a9dcc (patch)
tree0a49b7f5e0d82388947053b5ab5d0e4aaa1d284f /csv-sql
parenta18bec81c6f0e16aed6886257e80a0b5bacc3ed6 (diff)
cosmeticHEADmaster
Diffstat (limited to 'csv-sql')
-rwxr-xr-xcsv-sql9
1 files changed, 6 insertions, 3 deletions
diff --git a/csv-sql b/csv-sql
index b890cc0..b303d5f 100755
--- a/csv-sql
+++ b/csv-sql
@@ -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";