[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash
From: |
Jeffrey Walton |
Subject: |
Re: Bash |
Date: |
Wed, 15 Apr 2020 13:05:31 -0400 |
On Wed, Apr 15, 2020 at 11:26 AM Chet Ramey <address@hidden> wrote:
>
> On 4/15/20 11:15 AM, Jeffrey Walton wrote:
> > On Tue, Apr 14, 2020 at 4:54 PM Chet Ramey <address@hidden> wrote:
> >>
> >> On 4/14/20 4:33 PM, Tony Esposito wrote:
> >>> Thanks, I'll check it out. Just a quick question: Is anyone working on
> >>> a
> >>> database interface for bash, like one usually finds in other scripting
> >>> languages such as Perl (e.g. Perl DBI)?
> >>
> >> Not that I know of. Is there widespread need or desire for one?
> >
> > About 300 hits on Stack Overflow:
> > https://www.google.com/search?q=bash+sql+site:stackoverflow.com
>
> I looked at the first few of these, and they all seem to be questions about
> how to use an sql query client to read data into a variable (or variables).
> Is that the perceived need here?
Well, I can't speak for others, but in the past I wanted to do
something simple like create a SQLite database:
ATTACH DATABASE 'mydb.db' AS 'mydb';
CREATE TABLE IF NOT EXISTS mydb.username
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
fname VARCHAR,
lname VARCHAR,
email VARCHAR,
date DATETIME
);
and insert some values:
INSERT INTO mydb.username (fname, name) VALUES ("JOHN", "DOE");
I quickly learned Bash was the wrong tool for the job. At the moment,
I think it is easier to create a *.sql file and redirect it into the
SQL interpreter.
Jeff
- Bash, Tony Esposito, 2020/04/12
- Re: Bash, Jonesy, 2020/04/12
- Re: Bash, Chet Ramey, 2020/04/13
- Re: Bash, Tony Esposito, 2020/04/14
- Re: Bash, Chet Ramey, 2020/04/14
- Re: Bash, Tim Visher, 2020/04/15
- Re: Bash, Jeffrey Walton, 2020/04/15
- Re: Bash, Chet Ramey, 2020/04/15
- Re: Bash,
Jeffrey Walton <=
- Re: Bash, Greg Wooledge, 2020/04/15
- Re: Bash, Chet Ramey, 2020/04/15
- Re: Bash, Tim Visher, 2020/04/15
- Re: Bash, Greg Wooledge, 2020/04/15
- Re: Bash, Stephane Chazelas, 2020/04/19