help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash


From: Chet Ramey
Subject: Re: Bash
Date: Wed, 15 Apr 2020 14:54:17 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 4/15/20 1:05 PM, Jeffrey Walton wrote:

> 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");

That level of interaction isn't enough to incorporate SQL into bash. It
doesn't require access to any bash features. You can do this kind of thing
with an sql/mysql client and a here-document.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]