Skip to Content.
Sympa Menu

baslinux - Re: [BL] Importing csv to sqlite db, was Re: dbf to sql

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: baslinux AT lists.ibiblio.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] Importing csv to sqlite db, was Re: dbf to sql
  • Date: Wed, 16 Jul 2008 14:30:38 +0000 (UTC)


The dbf convertor has the option of creating csv using another separator
than ",", but I have not got this working yet:
dbf --csv --separator # file.csv file.dbf
ERROR: found no file for input
Please make sure that the last argument is a valid dBASE file.
Same no matter where I put the --separator #

It works without the separator option.
Can someone get the separator option to work?


The problem here is that # is a comment character in the shell, so dbf doesn't
see anything after the #, so it quite rightly says it hasn't got a file.

You can quote the # character:

dbf --csv --separator '#' file.csv file.dbf

This must be why sqlite uses
.separator ','

This worked, but it still puts " " around all the letter character strings (not the numbers) so I still need to edit those out after first changing " to ' in the original dbf file. One less step.

Thanks for the explanation. I should read a book about shell programming.

Is there a simple GUI frontend to sqlite for my friend, who wants something that will directly print invoices?


Anything in single quotes is not interpretted by the shell, so things like *
and # are sent through to the program.

Cheers

Ian

-----------------------
BasicLinux mailing list
-----------------------
http://www.basiclinux.com.ru
http://www.ibiblio.org/pub/linux/distributions/baslinux/
------------------------------------
To exit, send subject=unsubscribe to
baslinux-request AT lists.ibiblio.org





Archive powered by MHonArc 2.6.24.

Top of Page