Use SQLite in Bash

1#!/bin/bash
2sqlite3 test.db  "create table n (id INTEGER PRIMARY KEY,f TEXT,l TEXT);"
3sqlite3 test.db  "insert into n (f,l) values ('john','smith');"
4sqlite3 test.db  "select * from n;"

See stackoverflow post